SaveAsUI always true in Word 2000

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top