S
Stephen English
We have just upgraded from using Word 2000 running under Winwows 2000 to using Word XP running under Windows XP
I have a document that says it has a template of Manifest5SIS.dot and yet when I run the code below, it is telling me that the Attached template is Normal.dot. It worked fine in 2000
This code is stored in a startup template and run from a toolbar button
Any ideas please?
Stephen
On Error GoTo EXITSUB
Dim strMsg As String
With ActiveDocument
If .AttachedTemplate = "Manifest5SIS.dot" Then
.AttachedTemplate = _
"C:\Program Files\Microsoft Office\Templates\COS - General\Manifest5.dot"
ElseIf .AttachedTemplate = "Manifest4a.dot" Then
.AttachedTemplate = _
"C:\Program Files\Microsoft Office\Templates\COS - General\Manifest5.dot"
End If
If .AttachedTemplate = "Manifest5.dot" Then
'Debug.Print CDate(Application.Run("ReadProp", "ReviewDate"))
If CDate(Application.Run("ReadProp", "ReviewDate")) <= Now() Then
MsgBox "Click ShowDocProperties to change review date", vbOKOnly, "Check Review Date"
End If
End If
End With
Exit Sub
EXITSUB:
MsgBox "Error", vbOKOnly, "Sorry, I can't complete this task for you"
End Sub
I have a document that says it has a template of Manifest5SIS.dot and yet when I run the code below, it is telling me that the Attached template is Normal.dot. It worked fine in 2000
This code is stored in a startup template and run from a toolbar button
Any ideas please?
Stephen
On Error GoTo EXITSUB
Dim strMsg As String
With ActiveDocument
If .AttachedTemplate = "Manifest5SIS.dot" Then
.AttachedTemplate = _
"C:\Program Files\Microsoft Office\Templates\COS - General\Manifest5.dot"
ElseIf .AttachedTemplate = "Manifest4a.dot" Then
.AttachedTemplate = _
"C:\Program Files\Microsoft Office\Templates\COS - General\Manifest5.dot"
End If
If .AttachedTemplate = "Manifest5.dot" Then
'Debug.Print CDate(Application.Run("ReadProp", "ReviewDate"))
If CDate(Application.Run("ReadProp", "ReviewDate")) <= Now() Then
MsgBox "Click ShowDocProperties to change review date", vbOKOnly, "Check Review Date"
End If
End If
End With
Exit Sub
EXITSUB:
MsgBox "Error", vbOKOnly, "Sorry, I can't complete this task for you"
End Sub