[RESOLVED] Inserting Captions for Tables
Hello,
I am writing a Visual Basic macro in Word to format data that I extracted from Microsoft Access into tables. Is there a way to insert captions for these tables using my own values for Table Numbers? Currently, when I use .InsertCaption, I get labeling such as Table 1, Table 2, etc. I have a column in Access that contains the specific table numbers that I want for each table that I created (such as 3.2.1-1 for example). Is there a way that I can use these Table Numbers instead?
Thanks for your help!
Re: Inserting Captions for Tables
http://www.vbforums.com/attachment.p...id=47243&stc=1
I moved your question here since it looks like you are using VBA and not VB6.
Re: Inserting Captions for Tables
Welcome to the forums. :wave:
Here is how to get field names. Modify this to fit your needs.
Code:
Dim db As Database
Dim td As TableDef
Set db = Opendatabase("databasepath")
For Each td in db.TableDefs
ComboBox1.Additem td.Name
Next
Instead of adding them to a combo box, use them as a Caption.
Re: Inserting Captions for Tables
Re: Inserting Captions for Tables
Now that we've helped you, you can help us by pulling down the Thread Tools menu and selecting the Mark Thread Resolved item which will let everyone know that you have your answer. Also if someone has been particularly helpful you have the ability to affect a their forum "reputation" by rating their post. Only those ratings that you give after you have 20 posts will actually count, but the person you rate will see it and know that you appreciate their help.