Macro for Printing

P

Preet

Hi

I have a BIG problem! Please any help would be most appreciative!

Right, I have a document that has a macro in it, on opening, it mai
merges, and puts the document in Print Preview format.

From here the user can Go to File Print and print the doc (from th
print preview window), but then the document MUST close afte
printing.

I have added one peice of code, and it automatically brings up th
Print Dialogue, but I wanted it to do is Allow the user to click o
Print, and have the Print box to appear then, and NOT automatically.

After the document Prints I wanted the document to close with N
changes saved.

This is the code being used so far:


With Dialogs(wdDialogFilePrint)
If .Display = -1 Then
ActiveDocument.Close wdDoNotSaveChanges, wdOriginalDocumentFormat
False
.Execute
End If
End With


But this doesnt work! I hope someone sane help!

Thank you
 

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