PDA

View Full Version : Help with Word Form assign "bookmark" to ActiveX text box



merkyworks
02-22-2012, 05:49 PM
I'm very new to VBA and have been playing with very simple commands but for my first real VBA project I wanted to create a Word form that a user will fill out and save, the saved Word form data will then be imported into an Access DB. I was working off of a reference I found on the web and I was going to post if but apparently new member can't post links until they have 5 post so sorry :dunno.

I have been able to make the code work and I was able to import the Word form data into an Access DB. However I did run into a little hiccup with the Word form I created.

Initially I created the Word form with ActiveX text boxes but I kept having an error when compiling because the text boxes I placed in the Word form could not be recognized because there "bookmark" was not created/labeled. I also tried Rich Text Content Control boxes but they didnt work because of the same "bookmark" issue. The only way I could get the code to recognize a text box was use Legacy Form text boxes, I was able to assign a "bookmark" name with these. If I go to the "Insert" tab then the "Links" section and click on "Bookmarks" I can see they are named, however if I do this with the two other style text boxes the "bookmarks" do not exists. This was how I figured out what was causing the compiling error. I have played with the "Title", "Tag" and "Name" assignment but none of these worked so I know I need to assign a "bookmark" value to them.

So how do you assign a "bookmark" to a ActiveX text box or a Rich Text Content Control box?

macropod
02-23-2012, 05:14 AM
Hi merkyworks,

It's not even clear at this stage that you need bookmarks or, perhaps, even a macro. After all, Word has a 'save data for forms' capability that allows you to save just the formfield data from a document using them.

ActiveX controls are very much deprecated these days. With content controls, you don't need a bookmark - you can assign titles and tags instead.