FilePreview Settings

M

MJones

Hi,

I'm trying to do this:

Sub FilePreview()
'
' FilePreview Macro
' Previews the active document without drawing objects
'
If Application.PrintPreview = False Then
Options.PrintDrawingObjects = False
ActiveDocument.PrintPreview
End If
Options.PrintDrawingObjects = True
End Sub

So drawing objects don't show when previewing, but turn back on
afterwards. It works in my print macro (see below), but can't
understand why this doesn't work for FilePreview. Any ideas? Word
2003.

Sub FilePrintDefault()
'
' FilePrintDefault Macro
' Prints the active document without drawing objects
'
Options.PrintDrawingObjects = False
Dialogs(wdDialogFilePrint).Show
Options.PrintDrawingObjects = True
End Sub

Thanks,

Michele
 
M

MJones

Hi All,

I got my friend who knows Access VBA to help. Here's the final code
for both printing and print preview to turn off print drawings and set
it back to the original setting when done.

Dim mysetting
Sub FilePrintDefault()
' Prints the active document without drawing objects
mysetting = Options.PrintDrawingObjects
Options.PrintDrawingObjects = False
Dialogs(wdDialogFilePrint).Show
Options.PrintDrawingObjects = mysetting
End Sub
Sub FilePrintPreview()
' Previews the active document without drawing objects
mysetting = Options.PrintDrawingObjects
Options.PrintDrawingObjects = False
ActiveDocument.PrintPreview
End Sub
Sub ClosePreview()
' Turns drawing objects back on after exiting print preview
ActiveDocument.ClosePrintPreview
Options.PrintDrawingObjects = mysetting
End Sub
 

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