Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Cannot change bookmarks in MS Word 2013 document – PB Docs 2022 – PowerBuilder Library

Cannot change bookmarks in MS Word 2013 document – PB Docs 2022

Cannot change bookmarks in MS Word 2013 document

Symptom

A PowerBuilder application uses OLE automation to resolve
bookmarks in a DOC or DOCX document or template. This has worked well
under MS Word 2007. 

Using PowerBuilder and MS Word 2013, there are errors and no data
resolves to the bookmark.

Error occurs at line with this code:

Environment

  • PowerBuilder

  • Microsoft Word 2007

  • Microsoft Word 2013

Reproducing the Issue

1. If you don’t have MS Word2013, download a trial version.

2. Install MS Word 2013.

3. Unzip bookmark.zip.

4. Open testole.pbw and testole.pbt.

5. Open w_main/bookmark change cb.

6. Verify the location path for the ls_template_file_name

7. Run the app and click on the Bookmark Change cb.

8. Close the app and open the mytts.docx and notice PB did not
change/save the bookmark name from case_short_option to MyTest.

The PowerScript code in step 5 is:

Cause

Syntax changes from MS Word 2007 and MS Word 2013

Solution

When using MS Word 2013, change the PowerScript code from:

Use the modified PowerScript code with MS Word 2013:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x