[RESOLVED] Can you "label" sections of a word doc as reference points?
Okay, I don't do much in the way of VBA stuff, so please forgive me if I sound like an idiot (well, more than I normally do ).
So I've got this word doc that I am using as a template for program documentation. I also have an xml file that describes each screen. What I would like to do is take the contents of that xml file and match it to different parts of the document. For example..there is a textbox on the first page that is for the title. So I have a <title> tag in the xml and I would like to put its contents into that textbox.
So is there a way for me to tag that textbox as "title", so as I am going through the object model I could do something like...
Re: Can you "label" sections of a word doc as reference points?
If your txtbox is an ActiveX control, then you can set its name property to anything you like. You can then set its text property as follows. (My example textbox is named "txtTitle")
VB Code:
ThisDocument.txtTitle.Text = "Declan"
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful
Re: Can you "label" sections of a word doc as reference points?
No, this textbox would be of the type found in the Drawing menu in Word. But what I am trying to do is not limited to things like that. I need to be able to define certain areas that will contain certain data. For example...
first Title (text box)
then TOC (table of contents)
then Introduction (free form text)
then Screenshot
etc
and be able to fill in those specific sections with the data that pertains to them.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.