Author | Topic: Word and Bookmarks | |
---|---|---|
Kari | Word and Bookmarks on Wed, 28 Nov 2012 10:27:06 +0100 Hi Perhaps someone can give me a hint how to find what Bookmarks is in a .doc and how to protect them ? Best regards Kari oWord := CreateObject("Word.Application" ) if empty(oWord) dc_msgbox('Word not installed') RETURN endif oWord := oWord:dynamicCast( "ActiveXObject" ) oWord:quit := { || QuitCalled( @lEnd ) } oWord:visible := .T. oWord:activate() oWord:Documents:Open(cFile) oDoc := oWord:ActiveDocumentoDoc := oWord:ActiveDocument oBM := oDoc:Bookmarks nSize:=oDoc:Bookmarks:Count //How to find out what bookmarks is in the file? ReplaceBookmark(oBM , "DATE" , dDate) How to make the Bookmarks "protected"? |