10 March 2010 [Wednesday] @ March 10, 2010 edit
VBA: Exiting an protected form field to an unprotected bookmarkGoal #1: To get the cursor from the last form field on page 1 to the narrative bookmark on page 2.
Goal #2: Leave Page 1 protected via the section break and page 2 unprotected just as the document opened via the AutoNew macro.
Issues: Using numerous variations of the below code, the only thing that happens is the cursor does actually exit the last form field (via the exit macro) but only goes to the bottom of page 1 at the section break and never makes it to the bookmark. In view mode
ActiveDocument.Unprotect
ActiveDocument.Sections(1).ProtectedForForms = False
If ActiveDocument.Bookmarks.Exists("swPropNarr") Then
ActiveDocument.Bookmarks("swPropNarr").Select
End If
FYI: If I run the macro while the document is unprotected, it works perfect.
Sub macGoToBMPropNarr()
Application.OnTime When:=Now, Name:="ReallymacGoToBMPropNarr"
End Sub
-----------------------------------------------------------
Sub ReallymacGoToBMPropNarr()
If ActiveDocument.Bookmarks.Exists("swPropNarr") Then
ActiveDocument.Bookmarks("swPropNarr").Select
End If
End Sub
Thanks to: microsoft.public.word.vba.general
#If you have any other info about this subject , Please add it free.# |
| More »