S
scorpion53061
I realize this is a vba group but I am wondering if anyone might have
an idea what might be happening here. I create the instance of word,
open the document i want to remove the password from, set it so there
is no password, close it and reopen only to find the password prompt
again.
Any ideas?
Dim Word As Object = CreateObject("Word.Application")
Word.Visible = True
'Word.DisplayAlerts = 0
Word.Documents.Open(filename:=Application.StartupPath &
filename, PasswordDocument:="test")
Word.Application.Activate()
With Word.Application.ActiveDocument
.ReadOnlyRecommended = False
.EmbedTrueTypeFonts = False
.SaveFormsData = False
.SaveSubsetFonts = False
.Password = ""
.WritePassword = ""
.OptimizeForWord97 = False
End With
Word.Application.ActiveDocument.Save()
Word.Application.ActiveDocument.Close()
Word.Application.Quit()
Me.AxFramerControl1.Open(Application.StartupPath &
filename)
'password still being asked for
an idea what might be happening here. I create the instance of word,
open the document i want to remove the password from, set it so there
is no password, close it and reopen only to find the password prompt
again.
Any ideas?
Dim Word As Object = CreateObject("Word.Application")
Word.Visible = True
'Word.DisplayAlerts = 0
Word.Documents.Open(filename:=Application.StartupPath &
filename, PasswordDocument:="test")
Word.Application.Activate()
With Word.Application.ActiveDocument
.ReadOnlyRecommended = False
.EmbedTrueTypeFonts = False
.SaveFormsData = False
.SaveSubsetFonts = False
.Password = ""
.WritePassword = ""
.OptimizeForWord97 = False
End With
Word.Application.ActiveDocument.Save()
Word.Application.ActiveDocument.Close()
Word.Application.Quit()
Me.AxFramerControl1.Open(Application.StartupPath &
filename)
'password still being asked for