ReplaceBookmark error Word automation
Posted: Thu Feb 16, 2023 5:51 am
Hi,
I am using this function for automation replacing bookmarks with data from database to Word DOC document.
severa months I am not using this function, and now I get error :
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.
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.