Extra hard return in auto text

M

MrsMac

Word 2007. All of my auto text entries -- phrases, sentences, paragraphs --
have an added hard return. I have re-entered my entries, making sure that I
select ONLY the specific words or sentences that I need. The hard return is
still there. Any suggestions? Thanks in advance ...
 
J

Jay Freedman

MrsMac said:
Word 2007. All of my auto text entries -- phrases, sentences,
paragraphs -- have an added hard return. I have re-entered my
entries, making sure that I select ONLY the specific words or
sentences that I need. The hard return is still there. Any
suggestions? Thanks in advance ...

Go to Insert > Quick Parts > Building Block Organizer, select an autotext
entry, and click Edit Properties. In the resulting dialog, if the Options
dropdown is set to "Insert content in its own paragraph", change it to
"Insert content only". Click OK and confirm replacing the entry.

The Building Block Organizer will only let you modify one entry at a time.
If you have a large number of AutoText entries, use this macro to change
them all at one shot (see http://www.gmayor.com/installing_macro.htm if
needed).

Sub AllAutoTextInline()
' This macro changes all AutoText entries in a template
' to "insert in line" instead of "insert in separate paragraph"

Dim oTmpl As Template, idxTmpl As Template
Dim BB As BuildingBlock
Dim idxBB As Long

' if Building Blocks haven't been used yet in this session
Templates.LoadBuildingBlocks

' If the AutoText entries are stored in the Normal.dotm
' template, use this line instead of the For Each loop
' Set oTmpl = NormalTemplate
For Each idxTmpl In Templates
If InStr(idxTmpl.Name, "Building Blocks") Then
Set oTmpl = idxTmpl
Exit For
End If
Next

If Not (oTmpl Is Nothing) Then
For idxBB = 1 To oTmpl.BuildingBlockEntries.Count
Set BB = oTmpl.BuildingBlockEntries(idxBB)
If (BB.Type.Name = "AutoText") And _
(BB.InsertOptions = wdInsertParagraph) Then
BB.InsertOptions = wdInsertContent
End If
Next
End If

oTmpl.Save
Set oTmpl = Nothing
End Sub


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
T

Tony Jollans

When you created them (as building blocks) did you set the option "Insert
content in its own paragraph"?
 
M

MrsMac

They are all set up as "insert content only." They still come through with a
hard return. Any other suggestions?
 
K

karen.delsman

Here's my fix:
Before highlighting the text to be saved as AutoText, make certain there is a space before it. When the text is at the beginning of the line, a hard return is added in when the word or phrase is highlighted for some reason.
 
S

Stefan Blom

I can't reproduce what you described... Assuming that your selection did not
include a paragraph mark and that "Insert text only" was specified in the
New Building Block dialog box, no paragraph mark should be added as you
create the AutoText entry.

To make the task easier, click the ¶ button to display nonprinting marks.

Also, make sure that "Use smart paragraph selection" is cleared in Word
Options (File | Options).
 

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