VBA : Sending datas to bookmarks in a .doc

Malkavian

New Member
Joined
Jul 22, 2010
Messages
16
The solution if probably simple, but I've never done it so I have no idea how.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
I need to export the content of some Textboxes from a UserForm to bookmarks in a .doc.<o:p></o:p>
I found out how to do it, but I can't find how to send the right infos to the right bookmarks.<o:p></o:p>
<o:p></o:p>


I would like to know how to refer to each bookmarks. Do they have names? How can I see their indexes? I would have thought that the index would be the order of appearance but nope... 1,2,3,4,5,6,etc. are all mixed up everywhere in my 30 page long document...
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
For some reason I can't edit my post anymore.

The code was the one I used to try to figure the index order of the bookmarks... made me realize it's a huge cluster f***.

Now isn't there a place in Word where I can see the index of each bookmark? Or at least their name?
Like when I look at my .doc I see «FIRST» , «LAST» , «DEV» ... shouldn't FIRST, LAST and DEV be the name of those bookmarks?
Why do I get an error when writing Doc.Fields("FIRST").Select?
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top