L
Lars
Hi,
I have a serious problem with Word 2000 and a COM-Addin. I'm using the
following code from VB 6:
oApp.ActiveDocument.Protect Word.wdAllowOnlyFormFields, bClear, sPassW
(oApp is the instance of Word.)
I have also tried oApp.ActiveDocument.Protect Word.wdAllowOnlyFormFields but
no difference.
When called the first time nothing happens, next call cause Word to crash!
The same code works perfectly when using Word 2003.
When using the COM Addin under Word 2000 I also tried to use the Protection
Dialog like this:
Set oDlg = oApp.Dialogs(wdDialogToolsProtectDocument)
oDlg.NoReset = bClear
oDlg.DocumentPassword = sPassW
oDlg.Execute
Set oDlg = Nothing
This code above protects the document but I can't set the protection type.
According to the help file the DialogToolsProtectDocument dialog should have
a property called 'Type', as in the function call. But, Type is a read only
property in the base dialog so the protection type can't be set using that
property. How can I protect a document for Forms in Word 2000 from a COM
Addin?
Thanks in advance
Lars-Eric
I have a serious problem with Word 2000 and a COM-Addin. I'm using the
following code from VB 6:
oApp.ActiveDocument.Protect Word.wdAllowOnlyFormFields, bClear, sPassW
(oApp is the instance of Word.)
I have also tried oApp.ActiveDocument.Protect Word.wdAllowOnlyFormFields but
no difference.
When called the first time nothing happens, next call cause Word to crash!
The same code works perfectly when using Word 2003.
When using the COM Addin under Word 2000 I also tried to use the Protection
Dialog like this:
Set oDlg = oApp.Dialogs(wdDialogToolsProtectDocument)
oDlg.NoReset = bClear
oDlg.DocumentPassword = sPassW
oDlg.Execute
Set oDlg = Nothing
This code above protects the document but I can't set the protection type.
According to the help file the DialogToolsProtectDocument dialog should have
a property called 'Type', as in the function call. But, Type is a read only
property in the base dialog so the protection type can't be set using that
property. How can I protect a document for Forms in Word 2000 from a COM
Addin?
Thanks in advance
Lars-Eric