From: Larry Sulky on
Anyone know the constant (named or numeric) for the Format Picture
dialog box? It's not wdDialogFormatPicture -- that just opens the
Picture dialog.

I've tried using SendKeys to walk through the dialog but it only works
sometimes; it's just not reliable enough, even using a sleep routine.

---larry
From: Larry Sulky on
Or, failing that, anyone have any suggestions for automatically
compressing and downsampling (to the "web" setting of 92 dpi) in image
that has just been inserted. It needs to be something that's entirely
within VBA or makes a shell call to a tool that I can be certain will
exist on the users' machines.

TIA
---larry
From: Larry Sulky on
I found this reply in a thread on this subject. Looks like the
constant I'm looking for is 6382:



Jonathan West View profile
More options Oct 4 2005, 12:23 pm

Newsgroups: microsoft.public.word.vba.beginners,
microsoft.public.word.vba.general
From: "Jonathan West" <jw...(a)mvps.org>
Date: Tue, 4 Oct 2005 18:23:58 +0100
Local: Tues, Oct 4 2005 12:23 pm
Subject: Re: Image compression using VBA
Forward | Print | Individual message | Show original | Report this
message | Find messages by this author

"Robertico" <Robert...(a)nomail.notvalid> wrote in message


news:eV6oYQQyFHA.3312(a)TK2MSFTNGP09.phx.gbl...


>> OK, in that case the following line of code will bring up the Compress
>> Pictures dialog, allowing the user to decide what compression to apply

>> Commandbars.FindControl(Id:=6382).Execute


> I need to set this all by VBA, without any user interaction !


> Regards,


> Robertico



I think you may be out of luck. Unfortunately, that dialog is not a
member
of the dialogs collection, and so cannot be automated.

About the only thing I can suggest is that you use Sendkeys to try
and
simulate keypresses to the dialog.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org



From: Karl E. Peterson on
Larry Sulky wrote:
> Or, failing that, anyone have any suggestions for automatically
> compressing and downsampling (to the "web" setting of 92 dpi) in image
> that has just been inserted. It needs to be something that's entirely
> within VBA or makes a shell call to a tool that I can be certain will
> exist on the users' machines.

Seems I had to do that once, and used the resample method of the
cDIBSection.cls module available on vbAccelerator. Been a long time,
though, so I don't recall the details.

--
..NET: It's About Trust!
http://vfred.mvps.org


 | 
Pages: 1
Prev: Word is crashing
Next: Autotext 2007