ReplaceBookmark error Word automation

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

ReplaceBookmark error Word automation

#1 Post by Victorio »

Hi,

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)
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.
Attachments
worderror.gif
worderror.gif (21.48 KiB) Viewed 3875 times

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: ReplaceBookmark error Word automation

#2 Post by Koverhage »

This has to do with a update of word.
Look at trust center
disable the protected view
c7681ab5-fa2e-4944-97d2-88affe6776aa.png
c7681ab5-fa2e-4944-97d2-88affe6776aa.png (46.2 KiB) Viewed 3860 times
Klaus

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: ReplaceBookmark error Word automation

#3 Post by Victorio »

Hi Klaus,

I tryed modify this settings but this was not problem

Today I hope found problem,

* not work, problem with ActiveX access
oWord:documents:open( cFile, .F., .T. )

* work without problems
oWord:documents:open( cFile)

at this moment I do not know why I put this two parametres to function Open, but without it works fine

Have a nice day

Viktor

Post Reply