I have already accomplished creating a word document by clicking on a button.
Here is the code:
Private Sub CreateWord_Click()
On Error GoTo cmdOK_Error
Dim stDocName As String
stDocName = "Client-Status-Linda"
DoCmd.OutputTo acOutputQuery, stDocName, acFormatRTF, "Word.rtf", True
Also, I have attached the generated documented.
It generates a standard word document, however, I would like to be able to choose colors, font style, etc.
I know that you can use a template with the OutputTo method, however, I have not been successful in making it work.
expression.OutputTo(ObjectType, ObjectName, OutputFormat, OutputFile, AutoStart, TemplateFile, Encoding)
Please let me know how to accomplish generating a word file and formatting it with a template. Any help would be appreciated.