Word 2003: display Print Setup dialogue

M

Maz

Hi,

I want to display the built in Word dialog (wdDialogFilePrintSetup) via code.
One of the arguments it takes is Options (see here
http://msdn.microsoft.com/en-us/library/aa211930(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
 
D

Doug Robbins - Word MVP

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://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101



--
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
 
M

Maz

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://msdn.microsoft.com/en-us/library/aa211930(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
 
D

Doug Robbins - Word MVP

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
 
M

Maz

Doug: 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
 
J

jim

Maz

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
 
M

Maz

Hi 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
 
D

Doug Robbins - Word MVP

I 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top