-
WSJCSolutions
AskWoody LoungerJanuary 13, 2007 at 7:41 pm in reply to: Update fields after closing Header (Office 2003 Word) #1046885Perfect. Tks alot.
-
WSJCSolutions
AskWoody LoungerHi Henrik,
I work in a lawyers office and we use it for legal documents that go like this:
1.2 Lease Duration. The lease duration should not exceed…….
Only the 1.2 and Lease Duration is in bold and picked up by the ToC. The rest of the paragraph is in normal text.
At my new job, I came upon a doc like that and was curious on how this was achieved.
Thanks to Hans for his enlightment. -
WSJCSolutions
AskWoody LoungerPerfect. Tks Hans.
jc -
WSJCSolutions
AskWoody LoungerPerfect. Thanks Hans.
-
WSJCSolutions
AskWoody LoungerHi gang,
Let me answer my own post.
I closed the document then re-opened it to see the toolbar appear.
Wonder what happened. Might be just screen refresh.
Any clue?
tks -
WSJCSolutions
AskWoody LoungerHi Andrew,
Tks for the tip. The workgroup template seems like the logical approach. However, there are dozens of templates and they are separated in different sub folders in the user and/or workgroup templates location. If I put all the templates in a de fault folder it will make it more difficult for the user to find the right template when creating a new doc. By adding code to every new file created with a specific template I can specify the sub-folder in which this template is located.
Would there be a better way of doing this?
Tks -
WSJCSolutions
AskWoody LoungerHi Andrew,
Tks for the tip. The workgroup template seems like the logical approach. However, there are dozens of templates and they are separated in different sub folders in the user and/or workgroup templates location. If I put all the templates in a de fault folder it will make it more difficult for the user to find the right template when creating a new doc. By adding code to every new file created with a specific template I can specify the sub-folder in which this template is located.
Would there be a better way of doing this?
Tks -
WSJCSolutions
AskWoody LoungerThis worked just fine. Tks alot.
jc -
WSJCSolutions
AskWoody LoungerThis worked just fine. Tks alot.
jc -
WSJCSolutions
AskWoody LoungerOK that’s weird. Just before posting the code to you I decided to tiddy up the code a bit and I nested a With End With just so my code would look better and it works just fine now. I don’t understand but it works.
Here is what I had.Application.ScreenUpdating = False
Selection.Style = ActiveDocument.Styles(“Heading 1”)
Set T1Range = Selection.Paragraphs(1).Range
Set T1Line = ActiveDocument.Shapes.AddLine(96#, 256.5, 554.25, 256.5, T1Range)
With T1Line.Line
.Weight = 1.5
.DashStyle = msoLineSolid
.Style = msoLineSingle
‘ . . . etc.
End With
With T1Line
.Height = 0#
.Width = InchesToPoints(6.14)
‘. . . etc.
End With
Application.ScreenUpdating = TrueHere is what I changed it for
Application.ScreenUpdating = False
Selection.Style = ActiveDocument.Styles(“Heading 1”)
Set T1Range = Selection.Paragraphs(1).Range
Set T1Line = ActiveDocument.Shapes.AddLine(96#, 256.5, 554.25, 256.5, T1Range)
With T1Line
.Height = 0#
.Width = InchesToPoints(6.14)
‘. . . etc.
With .Line
.Weight = 1.5
.DashStyle = msoLineSolid
‘ . . . etc.
End With
End With
Application.ScreenUpdating = TrueWorks just fine now. I just cleaned up before the cleaning lady came.
Tks.
-
WSJCSolutions
AskWoody LoungerOK that’s weird. Just before posting the code to you I decided to tiddy up the code a bit and I nested a With End With just so my code would look better and it works just fine now. I don’t understand but it works.
Here is what I had.Application.ScreenUpdating = False
Selection.Style = ActiveDocument.Styles(“Heading 1”)
Set T1Range = Selection.Paragraphs(1).Range
Set T1Line = ActiveDocument.Shapes.AddLine(96#, 256.5, 554.25, 256.5, T1Range)
With T1Line.Line
.Weight = 1.5
.DashStyle = msoLineSolid
.Style = msoLineSingle
‘ . . . etc.
End With
With T1Line
.Height = 0#
.Width = InchesToPoints(6.14)
‘. . . etc.
End With
Application.ScreenUpdating = TrueHere is what I changed it for
Application.ScreenUpdating = False
Selection.Style = ActiveDocument.Styles(“Heading 1”)
Set T1Range = Selection.Paragraphs(1).Range
Set T1Line = ActiveDocument.Shapes.AddLine(96#, 256.5, 554.25, 256.5, T1Range)
With T1Line
.Height = 0#
.Width = InchesToPoints(6.14)
‘. . . etc.
With .Line
.Weight = 1.5
.DashStyle = msoLineSolid
‘ . . . etc.
End With
End With
Application.ScreenUpdating = TrueWorks just fine now. I just cleaned up before the cleaning lady came.
Tks.
-
WSJCSolutions
AskWoody LoungerYep, I thought of the paragraph border in the style but this template will end up on a Mac that uses Word 98 and there is a very limited choice of color for paragraph borders in Word 98. I think I will just let it go for now and when they upgrade the software I will put a paragraph border with the right color.
tks alot.
-
WSJCSolutions
AskWoody LoungerYep, I thought of the paragraph border in the style but this template will end up on a Mac that uses Word 98 and there is a very limited choice of color for paragraph borders in Word 98. I think I will just let it go for now and when they upgrade the software I will put a paragraph border with the right color.
tks alot.
-
WSJCSolutions
AskWoody LoungerTks. That was me yesterday. I managed to put a field into the footer now I want a graphic line. Can’t seem to find the right code for it.
Set Line = activedocument.shapes.addline won’t work because I am in a range and
Set Line = .range.shapes.addline won’t work either. My VBA knowledge is very limited. Could you help please.
tks. -
WSJCSolutions
AskWoody LoungerTks. That was me yesterday. I managed to put a field into the footer now I want a graphic line. Can’t seem to find the right code for it.
Set Line = activedocument.shapes.addline won’t work because I am in a range and
Set Line = .range.shapes.addline won’t work either. My VBA knowledge is very limited. Could you help please.
tks.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

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
-
Nintendo Switch 2 has a remote killing switch
by
Alex5723
1 minute ago -
Blocking Search (on task bar) from going to web
by
HenryW
4 hours, 42 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
9 hours, 49 minutes ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
9 hours, 55 minutes ago -
regarding april update and may update
by
heybengbeng
11 hours, 25 minutes ago -
MS Passkey
by
pmruzicka
7 hours, 29 minutes ago -
Can’t make Opera my default browser
by
bmeacham
19 hours, 5 minutes ago -
*Some settings are managed by your organization
by
rlowe44
5 hours, 48 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
17 hours, 59 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
1 day, 13 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day, 22 hours ago -
AI slop
by
Susan Bradley
12 hours, 47 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 23 hours ago -
Two blank icons
by
CR2
11 hours, 42 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
2 days, 8 hours ago -
End of 10
by
Alex5723
2 days, 11 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
1 day, 9 hours ago -
test post
by
gtd12345
2 days, 17 hours ago -
Privacy and the Real ID
by
Susan Bradley
2 days, 7 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
10 hours, 1 minute ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
2 days, 21 hours ago -
Upgrading from Win 10
by
WSjcgc50
1 day, 9 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 day, 13 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
3 days, 13 hours ago -
The story of Windows Longhorn
by
Cybertooth
3 days, 1 hour ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
3 days, 15 hours ago -
Are manuals extinct?
by
Susan Bradley
15 hours, 54 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
4 days ago -
Network Issue
by
Casey H
3 days, 11 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
4 days, 12 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.