• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using word bookmarks in an Excel file

Hi the forum,

First of all, I would like to wish everyone a happy 2017

I try to solve the following two problems.

I have two files, an Excel one and a Word document.

The Word document contents some text referenced by bookmarks.

The Excel file has one sheet containing a combobox and a userform.

What I try to do, without opening the word document, is:

1.- at the opening of the excel file, populate the active X combobox with the bookmarks

2.- when a combobox value is selected, loading the corresponding text under the bookmark from the word document in the textbox of the userform.

For example, if the value Antwerp is selected in the combobox, the text “Capital of Antwerp province in the region of Flanders” thru “The city also hosted the1920 Summer Olympics” has to be loaded in the textbox.


Do some people can help me to solve the two problems

Thanks in advance

Harry
 

Attachments

  • test bookmark.docx
    32.1 KB · Views: 4
  • test bookmark.xlsm
    16.2 KB · Views: 2

Salut haricot vert ! :DD

In this case easy way is each bookmark must contain desired textbox text
instead of just the bookmark name himself !
 
DemoBookmarks.gif
 
First within your Word document, you must delete actual bookmarks
(signets in french Excel version).
Instead of just selecting a city name, you must select the desired text
for the textbox and create a bookmark which name is same as city.
Repeat this procedure for each city.

Then save your Word document and attach it here in a new post
so I could check if it can work with my code …
 
Back
Top