J
JB
Hi Folks,
Is there any way I can stop a macro running when I use a file open
dialog to open the template containing the macro?
Public Sub OpenTemplate(bFileSel As Boolean)
On Error Resume Next
With Dialogs(wdDialogFileOpen)
.Name = "*.dot"
If .Display = -1 Then
strTempLoc = WordBasic.FileNameInfo$(.Name, 1) ' file
here has 'macros which seem to kill my app.???
.Execute
End If
If Len(strTempLoc) = 0 Then
MsgBox "You must Select a file"
bFileSel = False
Exit Sub
End If
bFileSel = True
End With
strTempName = ActiveDocument.Name
x = Len(strTempLoc) - Len(strTempName)
strLookPath = Left(strTempLoc, x)
Cheers
J
Is there any way I can stop a macro running when I use a file open
dialog to open the template containing the macro?
Public Sub OpenTemplate(bFileSel As Boolean)
On Error Resume Next
With Dialogs(wdDialogFileOpen)
.Name = "*.dot"
If .Display = -1 Then
strTempLoc = WordBasic.FileNameInfo$(.Name, 1) ' file
here has 'macros which seem to kill my app.???
.Execute
End If
If Len(strTempLoc) = 0 Then
MsgBox "You must Select a file"
bFileSel = False
Exit Sub
End If
bFileSel = True
End With
strTempName = ActiveDocument.Name
x = Len(strTempLoc) - Len(strTempName)
strLookPath = Left(strTempLoc, x)
Cheers
J