By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,505 Members | 1,517 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,505 IT Pros & Developers. It's quick & easy.

how to export access 2010 report to ms word

P: 62
I have created joining letter in access 2010,as it is a letter it is not in column and row format.
When i export report to word it does not shows report instead it shows column headings and data below it.
what will be the code to export entire report in ms word as it is in access on button click.
thank you
Nov 11 '13 #1

✓ answered by topher23

When you export from Access, you are always exporting data. This is why you are getting data (columns and rows) when you try to export from your report. What you want isn't an export of data but an output of your object with the selected data. Based on the little you've provided, I'd suggest creating an RTF output using:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, Me.Name, acFormatRTF, "Your\Desired\Filepath.rtf"
If that doesn't look right, try doing a PDF output:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, Me.Name, acFormatPDF, "Your\Desired\Filepath.pdf"
Then use a third-party converter to turn your PDF into a Word document.

Share this Question
Share on Google+
3 Replies


topher23
Expert 100+
P: 234
When you export from Access, you are always exporting data. This is why you are getting data (columns and rows) when you try to export from your report. What you want isn't an export of data but an output of your object with the selected data. Based on the little you've provided, I'd suggest creating an RTF output using:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, Me.Name, acFormatRTF, "Your\Desired\Filepath.rtf"
If that doesn't look right, try doing a PDF output:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, Me.Name, acFormatPDF, "Your\Desired\Filepath.pdf"
Then use a third-party converter to turn your PDF into a Word document.
Nov 11 '13 #2

P: 62
thanks topher it works well
Nov 12 '13 #3

zmbd
Expert Mod 5K+
P: 5,287
Yes, this is a known hiccup in the export report to word method for ACC2010. Drives me nuts! You have this great report with all the lines and grouping etc... and then Microsoft really messed things up by not exporting the pretty report like they used to do...

Both Topher23 suggestions are very workable. The PDF will give you the report as you have it in Access where as the RichText may still require some serious tweeking.

If you need somthing a little different then you have the MailMerge feature in Word. This can use the information within Access.
Here is a basic example from Microsoft - Use a table or query as a mail-merge data source

Then there is Application Automation... it is not for the faint of heart and I wouldn't consider it unless Topher23's suggestions or the Mailmerge fail to meet your needs.
Nov 14 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.