Send reports to word through VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I read the post from before but am unable to find anything through online
help other than it can be done. I am new to VBA usage. I have a report that
uses hyperlinks that I want the user to be able to access. Since reports
don't allow this, hoping exporting to a word file instead would be
successful. A PDF could work as well, as long as new software dosen't have to
be bought. I have acrobat. Thanks for any help you have.

Access2003
 
Perhaps this will help. The following is the VBA that I have written. If I
leave the outputfile blank, a export box pops up where I specify a location
to export to, then I a Run-time error '2585':
This action can't be carried out while processing a form or report event.

As said before. I am new to VBA so it could be something simple. Your help
would be most appreciated.
 
Ok, I have gotton farther. I changed it from on open, to on activate. The
word file opens as expected so that Hyperlinks can be used correctly. Having
difficulty getting the associated Form and Report to close. Here is my
current code.


Private Sub Report_Activate()

DoCmd.OutputTo acOutputReport, "Type and Work Report", acFormatRTF,
"G:\Interiors\Aircraft Quotes\Access\access.rtf", True - 1


DoCmd.Close acForm, "Search_Type_and_Work", acSaveNo


DoCmd.Close acReport, "Type_and_Work_Report", acSaveNo

End Sub
 
Back
Top