I posted this question under the Word board, but thought I’d better post it under VB too. I am inserting autotext entries via a VBA routine in Word. The paragraphs contain the appropriate styles and numbering (Heading 1, Heading 2), and when I defined the autotext entries, I was sure to include the paragraph marker. However, when the document assembles at the end of the routine, the entire document is body text style. When inserted manually, the autotext entries are formatted fine. I don’t want to have to insert each paragraph separately via VB and then apply the appropriate style. Any suggestions from the experts?
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Autotext entries lose styles/numbering (Word 97/VBA)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Autotext entries lose styles/numbering (Word 97/VBA)
- This topic has 4 replies, 2 voices, and was last updated 23 years, 8 months ago.
AuthorTopicWSJoanneOrzech
AskWoody LoungerAugust 27, 2001 at 4:40 pm #359562Viewing 0 reply threadsAuthorReplies-
WSKevin
AskWoody Lounger -
WSJoanneOrzech
AskWoody LoungerAugust 27, 2001 at 5:54 pm #539234Hi Kev!
Here’s a bit of it:
‘Yes Director – Yes Plan
If frmAuditLtrStandard.CheckBox8 = True Then
If frmAuditLtrStandard.CheckBox1 = True Then
ActiveDocument.Variables.Add Name:=”AttorneyName”, Value:=frmAuditLtrStandard.TextBox31.Text
ActiveDocument.Variables.Add Name:=”FiscalYear”, Value:=frmAuditLtrStandard.TextBox30.Text
If frmAuditLtrStandard.OptionButton1 = True Then
ActiveDocument.Variables.Add Name:=”AttorneyCapacity”, Value:=”Trustee”
ElseIf frmAuditLtrStandard.OptionButton2 = True Then
ActiveDocument.Variables.Add Name:=”AttorneyCapacity”, Value:=”Director”
End If
ActiveDocument.AttachedTemplate.AutoTextEntries(“Option11″).Insert _
Where:=Selection.Range
‘Yes Director – No Plan
ElseIf frmAuditLtrStandard.CheckBox8 = True Then
If frmAuditLtrStandard.CheckBox1 = False Then
ActiveDocument.Variables.Add Name:=”AttorneyName”, Value:=frmAuditLtrStandard.TextBox31.Text
ActiveDocument.Variables.Add Name:=”FiscalYear”, Value:=frmAuditLtrStandard.TextBox30.Text
If frmAuditLtrStandard.OptionButton1 = True Then
ActiveDocument.Variables.Add Name:=”AttorneyCapacity”, Value:=”Trustee”
ElseIf frmAuditLtrStandard.OptionButton2 = True Then
ActiveDocument.Variables.Add Name:=”AttorneyCapacity”, Value:=”Director”
End If
ActiveDocument.AttachedTemplate.AutoTextEntries(“Option11A”).Insert _
Where:=Selection.Range
End If
End If
End IfThis is SO VEXING!!!! Thanks for any insight you can give me.
-
WSKevin
AskWoody Lounger -
WSJoanneOrzech
AskWoody Lounger
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
4 hours, 17 minutes ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
6 hours, 5 minutes ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
6 hours, 7 minutes ago -
No April cumulative update for Win 11 23H2?
by
Peobody
8 hours, 25 minutes ago -
AugLoop.All (TEST Augmentation Loop MSIT)
by
LarryK
6 hours, 38 minutes ago -
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
21 hours, 41 minutes ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
1 day, 1 hour ago -
Inetpub can be tricked
by
Susan Bradley
1 day, 2 hours ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
5 hours, 59 minutes ago -
FBI 2024 Internet Crime Report
by
Alex5723
1 day, 5 hours ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
16 hours, 50 minutes ago -
Login issues with Windows Hello
by
CWBillow
1 day, 16 hours ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
1 day, 4 hours ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
2 days, 3 hours ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
2 days, 3 hours ago -
Google AI is now hallucinating idioms
by
Alex5723
2 days, 4 hours ago -
april update
by
69800
8 hours, 38 minutes ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
2 days, 5 hours ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
2 days, 5 hours ago -
WuMgr not loading?
by
LHiggins
1 day, 1 hour ago -
Word crashes when accessing Help
by
CWBillow
1 day, 9 hours ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
2 days, 5 hours ago -
Blank Inetpub folder
by
Susan Bradley
2 days, 2 hours ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
2 days, 15 hours ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
2 days, 2 hours ago -
Wait command?
by
CWBillow
2 days, 8 hours ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
2 days, 22 hours ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
3 days, 4 hours ago -
Windows 10 finally gets fix
by
Susan Bradley
3 days, 13 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
3 days, 15 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.