Line feed in wdDialogFileSummaryInfo.Title field?

M

Mike Starr

I'm building a template for documentation. I'm using a tree control on a
user form to allow the user to select from a list of products. I'm storing
the product name in the Title field. I'm using the contents of the Title
field for the title on the cover page of documents based on my template.
Sometimes the text I have to put there is too long for the available space
and the line wraps. I want to be able to control the point where the line
wraps. For example, rather than having something like:

"Product Family Product Variation
Name"

I need to have:

"Product Family
Product Variation Name"

Right now I'm populating the tree control from an extensive collection of
Add statements but I wrote those before I realized the line wrapping would
be problematic. The tree control doesn't care about line wrapping... it just
puts horizontal scroll bars in place to allow me to see the whole text
string. So now, I've got the text that I want to use in a spreadsheet in two
columns... Line One and Line Two. What I figure I'm going to have to do is
examine the contents of the Line Two column and if there's text there, I
want a line break before it. I wouldn't mind being able to populate the tree
control out of the same spreadsheet file but that's not a dealbreaker.

So what's the best approach I can take to make this happen? Do I need to
abandon the concept of using the Title field? Is it possible to both
populate the tree control (without line breaks) and create the value to
insert in the Title field (with line breaks) from the same spreadsheet?

Thanks for the help

Mike Starr
 
J

Jezebel

ActiveDocument.BuiltinDocumentProperties("Title") = "Product Family" & vbcr
& "Product Variation Name"

You can do this through VBA; you can't do it through the dialog because the
title field is a single-line text box.

Possibly a better alternative would be to use a second field: eg put
"Product Family" in the to Subject and "Product Variaton Name" into the
Title; then use both fields in the document.
 
M

Mike Starr

Thanks much for the help; that's gotten me on my way to where I want to be.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top