|
-
Jan 16th, 2004, 09:24 AM
#1
Thread Starter
Junior Member
Write a string to a field in a protected word doc
I've coded up a routine that opens up a protected word document containing text entry fields. The problem is when i try to write a string to the entry field. At the moment i move to the bookmark then try to enter text to the current selection.
I get an error saying that the program is trying to write to a protected area of the document.
<vb>
wSourceDoc.GoTo What:=wdGoToBookmark,name:="CompanyProfile"
wApp.Selection.TypeText Text:="my string"
</vb>
I just want to set focus to the field then populate the field with the text string.
any ideas
-
Jan 16th, 2004, 11:01 AM
#2
Thread Starter
Junior Member
its ok, however
figured it out, however, my field is limited to 750 chars in the receiving document. When i try to assign a string of length 700 chars i get a message saying 'string too long' error: 4609
i'm doing a trim and even a left(<var>,750) etc and its not helping. If i simply hard-code a value, i.e. "test value" it works ok.
completely puzzled by this, has anyone seen this behaviour before?]
thanks
john
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|