Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
768 views
in Technique[技术] by (71.8m points)

templates - VBA Message Box does not execute when opeing a New Document in MS-Word 2016

I have created a message box that automatically runs when a new document is opened based on a template:

' Display a pop-up message

Sub AutoNew()

MsgBox "UPDATE Page numbering if:" & vbCrLf & "" & vbCrLf & "Additional pages are added" & vbCrLf & "" & vbCrLf & "and/or" & vbCrLf & "" & vbCrLf & _
"Probation and/or Sex Offender case.", vbExclamation + vbOKOnly, "REMINDER!"

MsgBox "UPDATE ""Schedule Of Payments"" if special payment terms are ordered.", vbOKOnly, "REMINDER!"

MsgBox "UPDATE page headers if additional pages are added.", vbOKOnly, "REMINDER!"

End Sub

We have several office personnel that use templates stored on our network. The message boxes execute upon opening a new document, however, if that new document is still open and another new document is opened based on the same template is opened, the macro does not run.

Is there a solution for this?

question from:https://stackoverflow.com/questions/65600587/vba-message-box-does-not-execute-when-opeing-a-new-document-in-ms-word-2016

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...