Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

formfield, protected and hyperlink

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bye - 13 Apr 2005 08:01 GMT
Hello,
A question. I have a word document that is protected. When I open the
protected document it opens with the first textfield selected. So far so
good.
When I open this document by a hyperlink in another worddocument then it
opens but the first field is not selected. The cursor is on the left of the
field. In code:
activedocument.formfields(1).select doesn't work. Has anyone a solution?
Thanks
Dian D. Chapman, MVP - 22 Apr 2005 07:00 GMT
Add this code into the ThisDocument_Open event. It will cause the
cursor to go to that form field when the doc opens. You'll need to
know the name of that first field and replace "myFieldName" with the
bookmark name of your field.

   If ActiveDocument.Bookmarks.Exists("myFieldName") Then
       Selection.GoTo What:=wdGoToBookmark, Name:="myFieldName"
   End If

Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine

Free MS Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html

>Hello,
>A question. I have a word document that is protected. When I open the
[quoted text clipped - 5 lines]
>activedocument.formfields(1).select doesn't work. Has anyone a solution?
>Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.