Open report in Word in preview

jojo

Registered User.
Local time
Today, 18:23
Joined
Jul 20, 2012
Messages
51
I wonder if anyone can supply the code to open a simple access 2010 report in Word to PREVIEW, using a command button.

Thank you and thanks to all the responders of this great forum!
Jojo
 
Hi. I used this bit of code, and it seemed to work :

DoCmd.OpenReport stDocName, acPreview
 
thankk you for replying, TheHub. That will open the report in Access for preview. I need to be able to look at it and format it and make changes in Word.. thank you
Jojo
 
How about this:
DoCmd.OutputTo acOutputReport, "ReportNameHere", acFormatRTF, "FullFilePathAndNameHere", True

making sure to change the ReportNameHere to your actual report name and your FullFilePathAndNameHere to whatever it would be:

"C:\SomeFolder\MyDocumentName.doc" or .docx if Word 2007 or above.
 
beautiful! works perfectly thank you so much! You have given me several answers to pesky coding situations!! The Word doc opened up perfect-- ready for them to format for their printing purposes!! Thank you!!!
jojo
 

Users who are viewing this thread

Back
Top Bottom