Sending a file to MS Word

Cdogg

Registered User.
Local time
Today, 23:48
Joined
May 20, 2001
Messages
30
Can I push the File button and have it save using the LastName from the form as the filename and set rich text without having to go through 2 dialog boxes


Private Sub File_Click()
On Error GoTo Err_File_Click

Dim stDocName As String

stDocName = "MyForm"
DoCmd.OutputTo acReport, stDocName

Exit_File_Click:
Exit Sub

Err_File_Click:
MsgBox Err.Description
Resume Exit_File_Click

End Sub

Thank you for your help
 
You can specify a filename as a variable, see the OUtPutTo help for more information.

Ian
 

Users who are viewing this thread

Back
Top Bottom