Unanswered: having trouble opening doc in preview mode, and setting the zoom to 65 % using vba
I have an Access form. When user clicks button, print a word report, for the displayed employee.
The report builds nicely, I'm having 2 problems:
1) ending gracefully.
I want to open in preview mode, for user to print or exit.
The preview and zoom commands are giving me the following error:
error no: 91 description: object variable or with block variable not set
2) if I comment out the preview/zoom commands, sometimes the document prints and closes word gracefully, and sometimes I get the error message:
error no: 462 The remote server does not exist or is unavailable
Below is the code. I would gladly email, the word doc with code, if that would help.
If Err = 429 Then
'Word is not running; open Word with CreateObject
Set appWord = CreateObject("Word.Application")
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description