Word 2003: display Print Setup dialogue

Word 2003: display Print Setup dialogue

Post by TWF6 » Wed, 03 Dec 2008 22:35:02


Hi,

I want to display the built in Word dialog (wdDialogFilePrintSetup) via code.
One of the arguments it takes is Options (see here
http://www.yqcomputer.com/ (office.11).aspx)

But when I display the dialog the Options button at the bottom left hand
corner of the dialog is always grayed out, regardless of what I set the
Options property to. However, if I manually add this Word command (Tools,
Customize, Commands tab, File) the Options button is displayed!

How can I get the Options button enabled via code please?



Sub X()

With Dialogs(wdDialogFilePrintSetup)
.Options = 1 // if used, Option button disabled.
.Options = True // if used, Option button disabled.
.Show
End With
End Sub
 
 
 

Word 2003: display Print Setup dialogue

Post by Doug Robbi » Thu, 04 Dec 2008 14:22:26

What are you trying to do?

See the series of articles by fellow MVP Jonathon West on Controlling the
Printer from Word VBA that starts with the following:

Part 1: Using VBA to Select the Paper Tray at:

http://www.yqcomputer.com/



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

 
 
 

Word 2003: display Print Setup dialogue

Post by TWF6 » Thu, 04 Dec 2008 17:28:01

Hi Doug,

Thanks for your response but I have seen this article already.

I am really trying to do exactly what I say - display the Print Setup dialog
box in code.

The MS documentation states that the built in dialogue
wdDialogFilePrintSetup takes these arguments Printer, Options, Network,
DoNotSetAsSysDefault .
( http://www.yqcomputer.com/ (office.11).aspx). I am
guessing that the "Options" button displayed on the bottom left of the
resulting dialogue box is controlled by the "Options" argument. But as I say
that button is always disabled.

To see what I mean in Word 2003 invoke the dialog manually by Tools,

Thanks

Maz
 
 
 

Word 2003: display Print Setup dialogue

Post by Doug Robbi » Thu, 04 Dec 2008 18:26:00

For what purpose? There may be another way to accomplish what you are
after.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
 
 

Word 2003: display Print Setup dialogue

Post by TWF6 » Thu, 04 Dec 2008 21:07:03

oug: thanks but w.r.t. "for what purpose" because there is a requirement to
do so (too complex to go into here).

Regardless of the reason I want to do this, do you know the answer to my
problem?

Thanks,

Maz

"Doug Robbins - Word MVP" wrote:

 
 
 

Word 2003: display Print Setup dialogue

Post by jim » Fri, 05 Dec 2008 02:32:29

az

My guess is that you cannot get the dialog to display printer options
until you tell it what printer you are using.

Try inserting

.Printer="Name of valid printer on your system" on the line before
.Options="whatever"

it seems intuitive to me that there cannot be printer options until a
printer is selected

Hope this helps



On Wed, 3 Dec 2008 04:07:03 -0800, Maz < XXXX@XXXXX.COM >
wrote:

 
 
 

Word 2003: display Print Setup dialogue

Post by TWF6 » Fri, 05 Dec 2008 22:27:01

i Jim,

Many thanks for the good idea. I have tried it but it doesn't seem to solve
the problem. Just one of those things I guess!

Maz

"jim" wrote:

 
 
 

Word 2003: display Print Setup dialogue

Post by Doug Robbi » Sat, 06 Dec 2008 04:42:24

do not know the answer to that particular problem. If I had known, I
would have given it to you.

However, I you are prepared to tell us what you would do if the Options
button was available, we might be able to help you with another way of
achieving the same thing.

Your complex issue may well have a simple solution.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Maz" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...