Report output format

brucerwalker

Registered User.
Local time
Today, 03:50
Joined
Sep 23, 2015
Messages
24
I have a database that will export a report in .pdf format. I would like to change it so its output is in word format. I think the code that controls it is below. What would need to be changed in order to export the report in Microsoft Word? Thanks!

Private Sub Command56_Click()
Dim dlgSaveAs As FileDialog
Dim strPath As String

Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)
With dlgSaveAs
.InitialFileName = CurrentProject.Path & "\*.pdf"
.Title = "Save As"
End With

If dlgSaveAs.Show = True Then
strPath = dlgSaveAs.SelectedItems(1)
'MsgBox strPath
DoCmd.OutputTo acOutputReport, "Report2", acFormatPDF, strPath
Else
MsgBox "Save was cancelled"
End If
End Sub
 
I don't think you can. If you can there will be a different setting instead of acformatpdf, and intellisense will offer you the option.

you closest you might get is rtf (rich text format), but that won't give you graphical features.
 
The only other option is to use code to create a merged Word document. Albert Kallal wrote many excellent access things, have a look here to see if it is of any use - http://www.kallal.ca/msaccess/msaccess.html
 

Users who are viewing this thread

Back
Top Bottom