Text box default font

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a document with a mess of text boxes and callouts done up in the
default font. It’s a single drawing of sorts, and now I want to paste it as a
picture in a document with a different default font. Unhappily, all the
fonts change. I’ve considered:

1) Find/Replace with a new style – it will search only one text box at a time
2) Write some VBA to loop over the boxes and do direct formatting

Any suggestions? It’s actually worse – we have scads of such documents with
different defaults.
 
Hi =?Utf-8?B?RXZhbiBXZWluZXIgLSBSaWNoYWxuZCBXQQ==?=,
I have a document with a mess of text boxes and callouts done up in the
default font. It’s a single drawing of sorts, and now I want to paste it as a
picture in a document with a different default font. Unhappily, all the
fonts change. I’ve considered:

1) Find/Replace with a new style – it will search only one text box at a time
2) Write some VBA to loop over the boxes and do direct formatting

Any suggestions? It’s actually worse – we have scads of such documents with
different defaults.
Mmmm, yes. I've often wished for a way to set the default font for text boxes.
Basically, they pick up the Normal style for the current document.

If I know I'll be doing something like you want, I'll go into Word's picture editor
to create the original "diagram" and format it. That will give me a static picture
in the Word document, and no trouble with the copying and pasting.

But at this point, probably the best thing would be a macro that loops through all
the shape objects in the document, tests if they're a text box, and applies a style
that's unique for the document you're putting together. IOW, you'd need to cretaae
a different style name for each set of unique formatting.

Here's some sample code that will apply a style named Box1 to all textboxes and
callouts in the current document

Sub FormatAllTextBoxes()
Dim shp As Word.Shape

For Each shp In ActiveDocument.Shapes
If shp.Type = msoTextBox Or shp.Type = msoCallout Then
shp.TextFrame.TextRange.Style = "Box1"
End If
Next
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail :-)
 

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

Back
Top