J
Jürgen Magg
Hello!
Ich want that, when I open the document, a message box should appear, with
two buttons: Yes and No and the text: "Would you like to print this
document?"
So I wrote the following code, but it doesn't work:
Private Sub Document_Open()
Dim intResponse As Integer
Dim strName As String
Dim docLoop As Document
intResponse = MsgBox("Would you like to print this document?", vbYesNo)
If intResponse = vbYes Then
' Print
ActiveDocument.PrintOut
End If
End Sub
What's wrong
Jürgen
Ich want that, when I open the document, a message box should appear, with
two buttons: Yes and No and the text: "Would you like to print this
document?"
So I wrote the following code, but it doesn't work:
Private Sub Document_Open()
Dim intResponse As Integer
Dim strName As String
Dim docLoop As Document
intResponse = MsgBox("Would you like to print this document?", vbYesNo)
If intResponse = vbYes Then
ActiveDocument.PrintOut
End If
End Sub
What's wrong
Jürgen