Z
Z-man
I have some code that prevents users to perform SaveAs of document in MS
Word that is controled by my Application. I check SaveAsUI parameter and
cancel if it is True. Everything works fine with Word 2002 but with Word
2000 SaveAsUI is always = True.
We support Word 2000 and 2002 so it should work with both.
Anybody knows way around? Any suggestions?
example code:
Dim WithEvents oWord As Word.Application
Private Sub Command1_Click()
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
oWord.Documents.Add
End Sub
Private Sub oWord_DocumentBeforeSave(ByVal Doc As Word.Document, SaveAsUI As
Boolean, Cancel As Boolean)
If SaveAsUI = True Then
Cancel = True
End If
End Sub
Word that is controled by my Application. I check SaveAsUI parameter and
cancel if it is True. Everything works fine with Word 2002 but with Word
2000 SaveAsUI is always = True.
We support Word 2000 and 2002 so it should work with both.
Anybody knows way around? Any suggestions?
example code:
Dim WithEvents oWord As Word.Application
Private Sub Command1_Click()
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
oWord.Documents.Add
End Sub
Private Sub oWord_DocumentBeforeSave(ByVal Doc As Word.Document, SaveAsUI As
Boolean, Cancel As Boolean)
If SaveAsUI = True Then
Cancel = True
End If
End Sub