L
Lolan_p
I have used code like this several times to change the formatting of text on
protected forms, but now I seem to be getting errormessages like "command not
available" or "method or property is not available because the object refers
to a protected area of the document". The bookmark or formfield the
selection refers to is the one of the sections of the document that is not
protect so the user can enter in their information. How can I get around
this problem? Another point it is works for several other bookmarks
(formfields) in the document but not others? Why? I have had similar
problems with inserting tables into forms at bookmarks as well sometimes it
works other times it doesn't and I can't seem to find out why?
I have been writing the code using Office 2000 because a lot of the user are
still using that product.
ActiveDocument.Bookmarks("txtContributor").Select
With Selection.Find
.ClearFormatting
.Text = strTmp
.Replacement.ClearFormatting
.Replacement.Font.Bold = True
.Replacement.Text = strTmp
.Execute Replace:=wdReplaceOne
End With
Thanks for your time and help.
protected forms, but now I seem to be getting errormessages like "command not
available" or "method or property is not available because the object refers
to a protected area of the document". The bookmark or formfield the
selection refers to is the one of the sections of the document that is not
protect so the user can enter in their information. How can I get around
this problem? Another point it is works for several other bookmarks
(formfields) in the document but not others? Why? I have had similar
problems with inserting tables into forms at bookmarks as well sometimes it
works other times it doesn't and I can't seem to find out why?
I have been writing the code using Office 2000 because a lot of the user are
still using that product.
ActiveDocument.Bookmarks("txtContributor").Select
With Selection.Find
.ClearFormatting
.Text = strTmp
.Replacement.ClearFormatting
.Replacement.Font.Bold = True
.Replacement.Text = strTmp
.Execute Replace:=wdReplaceOne
End With
Thanks for your time and help.