I am using this function for automation replacing bookmarks with data from database to Word DOC document.
Code: Select all
static FUNCTION ReplaceBookmark(oBM,cBM,cValue)
LOCAL lRet := oBM:Exists(cBM) // zistÝ, Ŕi bookmark existuje
LOCAL oF
IF(lRet)
oF := oBM:Item(cBM) //
oF : Range:Text := cValue // At this row get Error Automation/6500
oF : Destroy() //
ENDIF
RETURN(lRet)
Error Automation/6500;Description :
You do not have permission to edit this selection. The selection is protected.;Thread ID : 1
Where can be problem, ? Can be it before some in windowdows 10 or office update ? But problem exist on Word 2013 and also Office 365 with latest version.