Edit FilePrintDefault, retaining dialog

Edit FilePrintDefault, retaining dialog

Post by J. Verbur » Tue, 06 Sep 2005 23:33:11


Hi all,

I am quite a newbie to VBA. I have found that I can 'intercept' the printing
commands by defining macros with identical names to the original commands.
I am using this to print a document, and with the macro, turn off the option
to print all drawing objects. (and afterwards turn it on again). I just
recorded three macros and pasted them together. (turn off, print, turn on)

But what I would really like to achieve, is a macro that replaces the
FilePrintDefault, turns off the 'print drawing objects' and then shows the
regular printing dialog. Then after the user has finished his printing
command, the macro would resume with again turning ON the printing of
drawing objects.

I can not find how to let the macro come up with the print dialog.

Any ideas?

Jeroen
 
 
 

Edit FilePrintDefault, retaining dialog

Post by Jezebe » Tue, 06 Sep 2005 23:41:37

Read Help on the Dialogs collection. The print dialog is wdDialogFilePrint.
You can Show the dialog to run it as normal, Display it to get input without
acting on it, or Execute it to act on it without seeing it.

 
 
 

Edit FilePrintDefault, retaining dialog

Post by J. Verbur » Tue, 06 Sep 2005 23:43:16

Sorry, just found it in vba.general

Dialogs(wdDialogFilePrint).Show

Jeroen


"J. Verburg" < XXXX@XXXXX.COM > schreef in bericht