T
ThinkPink
I am trying to place a .docm document on our intranet for employees to use a
specific format for official letters. This document has a userform that
should show when it is opened opened for the first time but not after it has
been saved with a new name. The problem comes in when the first new document
opens as "Notice[1].docm" then the next new document opens as
"Notice[2].docm", and so on.
Is there code that can recognize "Notice" but follow it with a wildcard so
the userform will show.
My current code is:
Sub autoopen()
With ThisDocument
If ActiveDocument.Name = "Notice.docm" Then
NoticeForm.Show
Else
NoticeForm.Hide
End If
End With
End Sub
specific format for official letters. This document has a userform that
should show when it is opened opened for the first time but not after it has
been saved with a new name. The problem comes in when the first new document
opens as "Notice[1].docm" then the next new document opens as
"Notice[2].docm", and so on.
Is there code that can recognize "Notice" but follow it with a wildcard so
the userform will show.
My current code is:
Sub autoopen()
With ThisDocument
If ActiveDocument.Name = "Notice.docm" Then
NoticeForm.Show
Else
NoticeForm.Hide
End If
End With
End Sub