Solved

Can Access 2007 export a report to Word and save it in a 'prior to 2007' format?

Posted on 2010-11-16
6
304 Views
Last Modified: 2012-05-10
I have a command button on an Access 2007 form which exports a report to Word. Is it possible, through VBA, to export the report and have it saved in a format compatible with older versions of Word?
0
Comment
Question by:newbie46
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 34145320
If you specify a .doc file that should be sufficient.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 34145325
Please post the code you are using now.
0
 

Author Comment

by:newbie46
ID: 34145351
matthewspatrick,
DoCmd.OutputTo acOutputReport, "rptA", acFormatRTF, PMTableName & ".rtf", True
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 34145476
Access does not do a native export to Word.  The closest it gets to is RTF (rich text format), which Word is able to interpret.  Some, but by no means all, of the formatting in Access is translatable into RTF, but in my experience the fidelity is not high, and I avoid using it unless I absolutely must.

Have you tried opening an RTF document generated from Access 2007 in Word 2003?  My gut feeling is that it will probably work.
0
 

Author Closing Comment

by:newbie46
ID: 34145663
thanks.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 34145797
Personally, I avoid the RTF export as well, since it embeds hard carrage returns and has other formatting issues.

If I want my output to go to Word, I generally write a custom procedure that opens Word via automation, and I build the Word document from scratch.  I could post some sample code (if you are interested), it wouldn't mean much because all the tables and fields are meaningless, but it might give you some ideas regarding how to do this.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
This collection of functions covers all the normal rounding methods of just about any numeric value.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now