Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word User Forms - Formatting Text that appears on Document 1

Status
Not open for further replies.

supernewb

Technical User
Feb 7, 2005
18
US
hi all,
i have created a user form in a Word template which passes along the selected/typed in info to a formatted Word Document (at designated bookmarks). one of the user fields is the applicants "first name". this "first name" is used many times throughout the finished document and works fine, EXCEPT one place, where it is used as a title/heading for a chart. i would like "first name" to appear bold and larger pt. font. i cannot find info on this anywhere.

does anyone know if the formatting is done on the Document or in the VBA?
thanks!
Dina
 
When you want text in your heading I know that you first have to open the heading in your code.

This code will open your header:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader


Best Regardz,

Spikemannen
 
Spikemannen - I believe the posting was a question on Heading, not headers.

supernewb - what you want, if the info is being dumped into a bookmark is:

a Style for the paragraph (or even a character style) that will contain THAT particular information. The inserted text will take on the style of the paragragh it is inserted into.

You can always (and it is a good idea) it make sure the style IS in fact the correct one. This can be explicitly dove via VBA.

To answer the question. IF there is an explicit style for the paragraph the text is inserted into, that style takes priority. Therefore it is an aspect or codition of the Document. You can also explicitly set the style with VBA.

Gerry
 
thank you both for responding so quickly.

fumei,
this is EXACTLY what i needed!! this is the same 25+ page doc i have been working on for awhile now, and putting the formatting into the header would not have worked.

thank you so much.

Spikemannen - good info to know, will probably use this later.


thanks,
dina
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top