-
WSAndrew77
AskWoody LoungerIf you can’t get that Add-In to work, you can make the change yourself in the Registry.
Requisite warning about being careful when editing the registry. Just take it slow. You’re making a real minor change here.
Go to Start -> Run, and Run regedit.exe
Navigate to:
HKEY_CURRENT_USERSoftwareMicrosoftOffice11.0CommonGeneral
Select the “DoNotDismissFileNewTaskPane” key. Change its value from 1 to 0.
Exit regedit and restart Word. Word will now follow whatever setting you have for the Task Pane in Tools->Options->View
HTH
-
WSAndrew77
AskWoody LoungerHans has pointed you in the right direction on this one, but as a sidebar, there are times when your initial approach may be useful or even necessary. When that happens, there’s a few things you can do to speed up your code.
For example, when using Find/Replace, you can search for Highlighting, but you can’t specify which color. So if you’ve got a document that uses red and blue highlighting, and you only want to clear the red highlighting, you’re in a bind. It can be done using the Find object, but it’s much easier to code (and understand) if you use a simple For…Each loop, which is is much faster than a regular For…Next loop.
To solve our hypothetical highlighting problem:
Sub RemoveOnlyRedHighlighting() Dim char As Range For Each char In ActiveDocument.Characters If char.HighlightColorIndex = wdRed Then char.HighlightColorIndex = wdNoHighlight End If Next char End Sub
In general, use a For…Each loop when you’ll be visiting each object in a collection of objects, as long as you’re not deleting any of them.
This wouldn’t be as fast as using the Find object, but its performance is respectable, considering it hits each character. And it’s got the added benefit of being simple to code — a similar macro using the Find object would be about three times as long.
To see how much faster a For…Each loop is, try this version of your original code:
Sub AnySuperOrSubScripts() Dim char As Range For Each char In ActiveDocument.Characters If (char.Font.Subscript) Or _ (char.Font.Superscript) Then MsgBox "There are superscript or subscript characters " & _ "present in this document!", vbInformation, _ "Reformat" Exit For End If Next char End Sub
Since you just wanted to know if there were any sub/super script, this version stops as soon as it finds any.
BTW, just like the Find object, this method won’t catch items in the Header/Footer, or in Footnotes, Comments, etc.Just my $.02
-
WSAndrew77
AskWoody LoungerHans has pointed you in the right direction on this one, but as a sidebar, there are times when your initial approach may be useful or even necessary. When that happens, there’s a few things you can do to speed up your code.
For example, when using Find/Replace, you can search for Highlighting, but you can’t specify which color. So if you’ve got a document that uses red and blue highlighting, and you only want to clear the red highlighting, you’re in a bind. It can be done using the Find object, but it’s much easier to code (and understand) if you use a simple For…Each loop, which is is much faster than a regular For…Next loop.
To solve our hypothetical highlighting problem:
Sub RemoveOnlyRedHighlighting() Dim char As Range For Each char In ActiveDocument.Characters If char.HighlightColorIndex = wdRed Then char.HighlightColorIndex = wdNoHighlight End If Next char End Sub
In general, use a For…Each loop when you’ll be visiting each object in a collection of objects, as long as you’re not deleting any of them.
This wouldn’t be as fast as using the Find object, but its performance is respectable, considering it hits each character. And it’s got the added benefit of being simple to code — a similar macro using the Find object would be about three times as long.
To see how much faster a For…Each loop is, try this version of your original code:
Sub AnySuperOrSubScripts() Dim char As Range For Each char In ActiveDocument.Characters If (char.Font.Subscript) Or _ (char.Font.Superscript) Then MsgBox "There are superscript or subscript characters " & _ "present in this document!", vbInformation, _ "Reformat" Exit For End If Next char End Sub
Since you just wanted to know if there were any sub/super script, this version stops as soon as it finds any.
BTW, just like the Find object, this method won’t catch items in the Header/Footer, or in Footnotes, Comments, etc.Just my $.02
-
WSAndrew77
AskWoody LoungerHi Randall
Yet another way:
Function IsValidFileName(sFileName As String) As Boolean If (sFileName Like "*[?*:/{}]*" Or _ sFileName Like "*[[]*" Or _ sFileName Like "*[]]*") Then IsValidFileName = False Else IsValidFileName = True End If End Function
-
WSAndrew77
AskWoody LoungerHi Randall
Yet another way:
Function IsValidFileName(sFileName As String) As Boolean If (sFileName Like "*[?*:/{}]*" Or _ sFileName Like "*[[]*" Or _ sFileName Like "*[]]*") Then IsValidFileName = False Else IsValidFileName = True End If End Function
-
WSAndrew77
AskWoody LoungerHi Jeanie,
I think this is what you’re looking for:
Sub MoveToNextHeading() With Selection With .Find .ClearFormatting .Text = "^p^p" .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With If (.Find.Execute) Then .Collapse wdCollapseEnd .MoveEndUntil cset:=Chr(13) .Collapse wdCollapseEnd End If End With End Sub
HTH,
-
WSAndrew77
AskWoody LoungerHi Jeanie,
I think this is what you’re looking for:
Sub MoveToNextHeading() With Selection With .Find .ClearFormatting .Text = "^p^p" .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With If (.Find.Execute) Then .Collapse wdCollapseEnd .MoveEndUntil cset:=Chr(13) .Collapse wdCollapseEnd End If End With End Sub
HTH,
-
WSAndrew77
AskWoody LoungerHi Clark,
If you change the name of the macro you recorded to “InsertDateField” it will run when the “InsertDate” toolbar button is pressed.
-
WSAndrew77
AskWoody LoungerHi Clark,
If you change the name of the macro you recorded to “InsertDateField” it will run when the “InsertDate” toolbar button is pressed.
-
WSAndrew77
AskWoody LoungerHi all,
Sorry to keep resurrecting this thread, but I had a Eureka moment today, and needed to share. I was trying to figure out how to kill the Char style, but keep the formatting, and then it hit me:
Dim rng as Range Dim f as Font ... Set f = rng.Font.Duplicate rng.Font.Reset rng.Font = f ...
That removes the character style, then reapplies all the style’s formatting.
I had this split into three separate macros, but thought a single subroutine would be (slightly) easier to follow. If anyone’s interested in the separated (and better commented versions), I can post that as well.
The attached macro:
(1). Deletes any “Char Char” styles
(2). Retains the character formatting of the text that had the “Char Char” style applied
(3). Retains any style aliases
(4). Allows for document styles that begin with “Char”Another issue I’ve encountered (it usually shows up when the document’s opened in Word 2000) is that often there will be a paragraph style with “Char Char” in the name, and the original style without the “Char Char” will still be in the document. That raises an error when trying to rename the “Char Char” style. This macro takes care of that, applying the “Char-free”
style to any text that has the “Char Char” paragraph style applied, and then deletes that style.
I tried to make something that would work in Word 2000/97, which don’t support the LinkStyle property, but I couldn’t do it. There’s a line in the code:
sty.LinkStyle = wdStyleNormal
that should be commented out on Word 2000 (or you’ll get a compilation error).
I would appreciate any feedback.
-
WSAndrew77
AskWoody LoungerHi all,
Sorry to keep resurrecting this thread, but I had a Eureka moment today, and needed to share. I was trying to figure out how to kill the Char style, but keep the formatting, and then it hit me:
Dim rng as Range Dim f as Font ... Set f = rng.Font.Duplicate rng.Font.Reset rng.Font = f ...
That removes the character style, then reapplies all the style’s formatting.
I had this split into three separate macros, but thought a single subroutine would be (slightly) easier to follow. If anyone’s interested in the separated (and better commented versions), I can post that as well.
The attached macro:
(1). Deletes any “Char Char” styles
(2). Retains the character formatting of the text that had the “Char Char” style applied
(3). Retains any style aliases
(4). Allows for document styles that begin with “Char”Another issue I’ve encountered (it usually shows up when the document’s opened in Word 2000) is that often there will be a paragraph style with “Char Char” in the name, and the original style without the “Char Char” will still be in the document. That raises an error when trying to rename the “Char Char” style. This macro takes care of that, applying the “Char-free”
style to any text that has the “Char Char” paragraph style applied, and then deletes that style.
I tried to make something that would work in Word 2000/97, which don’t support the LinkStyle property, but I couldn’t do it. There’s a line in the code:
sty.LinkStyle = wdStyleNormal
that should be commented out on Word 2000 (or you’ll get a compilation error).
I would appreciate any feedback.
-
WSAndrew77
AskWoody LoungerHere’s the VB6 string functions written in VB5 if you’re interested. These are much better than the ones in the knowledgebase.
-
WSAndrew77
AskWoody LoungerHere’s the VB6 string functions written in VB5 if you’re interested. These are much better than the ones in the knowledgebase.
-
WSAndrew77
AskWoody LoungerHi Andrew,
Just tried that, but I keep getting that non-printing character (ASCII value 2).
I was trying to write a macro that would generate a 2-column table of footnotes, with the paragraph containing the reference (and including the reference) in one column, and the footnote text in the other.
Thanks for your help!
-
WSAndrew77
AskWoody LoungerHi Andrew,
Just tried that, but I keep getting that non-printing character (ASCII value 2).
I was trying to write a macro that would generate a 2-column table of footnotes, with the paragraph containing the reference (and including the reference) in one column, and the footnote text in the other.
Thanks for your help!
![]() |
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
-
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
2 hours, 38 minutes ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
6 hours, 3 minutes ago -
W11 24H2 – Susan Bradley
by
G Pickerell
7 hours, 59 minutes ago -
7 tips to get the most out of Windows 11
by
Alex5723
6 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
12 hours, 7 minutes ago -
I installed Windows 11 24H2
by
Will Fastie
3 hours, 2 minutes ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
11 hours, 26 minutes ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
1 hour, 55 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
19 hours, 41 minutes ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
3 hours, 53 minutes ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
4 hours, 8 minutes ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
1 day, 12 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
1 day, 21 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
23 hours, 33 minutes ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
1 day, 5 hours ago -
Is data that is in OneDrive also taking up space on my computer?
by
WShollis1818
1 day, 16 hours ago -
Nvidia just fixed an AMD Linux bug
by
Alex5723
3 days, 8 hours ago -
50 years and counting
by
Susan Bradley
6 hours, 18 minutes ago -
Fix Bluetooth Device Failed to Delete in Windows Settings
by
Drcard:))
9 hours, 7 minutes ago -
Licensing and pricing updates for on-premises server products coming July 2025
by
Alex5723
3 days, 19 hours ago -
Edge : Deprecating window.external.getHostEnvironmentValue()
by
Alex5723
3 days, 19 hours ago -
Rethinking Extension Data Consent: Clarity, Consistency, and Control
by
Alex5723
3 days, 19 hours ago -
OneNote and MS Word 365
by
CWBillow
3 days, 21 hours ago -
Ultimate Mac Buyers Guide 2025: Which Mac is Right For You?
by
Alex5723
3 days, 21 hours ago -
Intel Unison support ends on Windows 11 in June
by
Alex5723
3 days, 21 hours ago -
April 2025 — still issues with AMD + 24H2
by
Kevin Jones
1 day, 12 hours ago -
Windows 11 Insider Preview build 26200.5518 released to DEV
by
joep517
4 days, 9 hours ago -
Windows 11 Insider Preview build 26120.3671 (24H2) released to BETA
by
joep517
4 days, 9 hours ago -
Forcing(or trying to) save Local Documents to OneDrive
by
PateWilliam
4 days, 18 hours ago -
Hotpatch for Windows client now available (Enterprise)
by
Alex5723
4 days, 5 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.