home *** CD-ROM | disk | FTP | other *** search
- REM For best results, run this script in a new document.
-
- REM Enter some text
- .Type "This is a bookmark."
- REM Select the word "bookmark"
- .Type "[Left][ctrlshiftLeft]"
- REM Mark the text
- MarkerName = .Mark($LwpMarkerTypeBookmark)
- REM Create a bookmark named "Sample from the marked text
- .Division.BookmarkManager.AddBookmark "Sample", MarkerName
-
- REM Use a TextMarker to manipulate the bookmark.
- Dim bookmark As TextMarker
- Set bookmark = .Division.Foundry.Markers(.Division.BookmarkManager.Bookmarks("Sample").MarkerName)
-
- textToMessage = "The current bookmark contains the word """ + bookmark.GetMarkedText() + """"
- Messagebox textToMessage,, "Script Sample"
- REM Replace the bookmark with the words "sample bookmark"
- bookmark.Replace $LWPReplaceObjectTypeCharacter, "sample bookmark"
-
- .GotoBookmark "Sample"
-