H
hlam
Is there a way that I can input text via VBA thru Access 2000 to text form
fields word document that is write protected and how?
This word document is created from headquarter that cannot be unprotected
without a password. I am thinking as I can type in text in text fields I
should be able to type in text in VBA even though it is protected if I am
right.
Here are the codes I am using but is not working:
Dim wd As Object
Set wd = CreateObject("word.application")
wd.Documents.Open "F:\testing"
wd.Parent.Visible = True
wd.Activate
wd.ActiveDocument.Bookmarks("FirstName").Select
Selection.TypeText Text:="Hello" ** error message
** error message: Method 'Selection' of object '_Global' failed
** if I use "wd.Selection.TypeText Text:="Hello" it gives me message
that document is protected
fields word document that is write protected and how?
This word document is created from headquarter that cannot be unprotected
without a password. I am thinking as I can type in text in text fields I
should be able to type in text in VBA even though it is protected if I am
right.
Here are the codes I am using but is not working:
Dim wd As Object
Set wd = CreateObject("word.application")
wd.Documents.Open "F:\testing"
wd.Parent.Visible = True
wd.Activate
wd.ActiveDocument.Bookmarks("FirstName").Select
Selection.TypeText Text:="Hello" ** error message
** error message: Method 'Selection' of object '_Global' failed
** if I use "wd.Selection.TypeText Text:="Hello" it gives me message
that document is protected