-
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
-
24H2 fixed??
by
CWBillow
51 minutes ago -
Uninstalr Updates
by
jv16
57 minutes ago -
Apple zero days for April
by
Susan Bradley
6 hours, 21 minutes ago -
CVE program gets last-minute funding from CISA – and maybe a new home
by
Nibbled To Death By Ducks
11 hours, 52 minutes ago -
Whistleblower describes DOGE IT dept rumpus at America’s labor watchdog
by
Nibbled To Death By Ducks
23 hours, 41 minutes ago -
Seeing BSOD’s on 24H2?
by
Susan Bradley
6 hours, 36 minutes ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
14 hours, 5 minutes ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
1 day, 8 hours ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
1 day, 11 hours ago -
0patch
by
WSjcgc50
12 hours, 10 minutes ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
1 day, 4 hours ago -
Windows 11 Insider Preview Build 22631.5261 (23H2) released to Release Preview
by
joep517
1 day, 14 hours ago -
Problem opening image attachments
by
RobertG
1 day, 15 hours ago -
advice for setting up a new windows computer
by
routtco1001
2 days, 6 hours ago -
It’s Identity Theft Day!
by
Susan Bradley
1 day, 10 hours ago -
Android 15 require minimum 32GB of storage
by
Alex5723
2 days, 11 hours ago -
Mac Mini 2018, iPhone 6s 2015 Are Now Vintage
by
Alex5723
2 days, 11 hours ago -
Hertz says hackers stole customer credit card and driver’s license data
by
Alex5723
2 days, 12 hours ago -
Firefox became sluggish
by
Rick Corbett
4 hours, 18 minutes ago -
Windows 10 Build 19045.5794 (22H2) to Release Preview Channel
by
joep517
2 days, 15 hours ago -
Windows 11 Insider Preview Build 22635.5235 (23H2) released to BETA
by
joep517
2 days, 16 hours ago -
A Funny Thing Happened on the Way to the Forum
by
bbearren
1 day, 13 hours ago -
Download speeds only 0.3Mbps after 24H2 upgrade on WiFi and Ethernet
by
John
10 hours, 37 minutes ago -
T-Mobile 5G Wireless Internet
by
WSmmi16
1 day, 14 hours ago -
Clock missing above calendar in Windows 10
by
WSCape Sand
1 day, 15 hours ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
3 days, 7 hours ago -
The time has come for AI-generated art
by
Catherine Barrett
2 days, 11 hours ago -
Hackers are using two-factor authentication to infect you
by
B. Livingston
2 days, 20 hours ago -
23 and you
by
Max Stul Oppenheimer
3 days, 4 hours ago -
April’s deluge of patches
by
Susan Bradley
1 day, 8 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.