-
WSAndrew77
AskWoody LoungerDecember 12, 2005 at 8:26 pm in reply to: Hide who makes changes in track changes (Word 2000) #989845See post 441,718 for info on how to modify the identity of the reviewer using RTF.
HTH,
-
WSAndrew77
AskWoody LoungerRather than just remove the buttons that apply directy formatting, I “re-educate” the buttons to apply styles instead. For example, when an author presses “I” (or Ctrl-I), one of several character styles is applied, based on context (unless they’ve selected multiple paragraphs, in which case nothing happens). Same thing for Bold, Bullets, Numbering, Indent, etc. User education is difficult — relatively speaking, button education is much easier …
-
WSAndrew77
AskWoody LoungerThanks, Jefferson!
-
WSAndrew77
AskWoody LoungerAs someone who has implemented this in code, I’ll say it ain’t easy, but it can be done. If you’re looking at making a ton of xrefs, it can be worth it. I for one hate that infernal, tiny cross reference dialog.
Hack 44 (“Hack More Flexible Cross Referencing”) in my book (see signature below) covers how to implement your own cross reference dialog. We use a more complex version of that code (which includes a pulldown to choose external docs) in our authoring template.
-
WSAndrew77
AskWoody LoungerIt’s not really a reference, but there’s plenty of stuff on working around problems in Word Hacks. I’m obviously partial
, but I honestly refer to it myself regularly. It’s squarely aimed at intermediate to advanced users, especially those willing to get their hands a little dirty under the hood.
Cheers!
-
WSAndrew77
AskWoody LoungerHi Barb,
Thanks for posting the sample, it really helped me understand the files you’re working with. Not XSLT, but certainly influenced by it!
I’ve attached a zip file containing two documents: “list-xpaths.xsl” and “xpaths.txt”. I created the second file, “xpaths.txt”, by applying the first as a transformation to the document you posted.
To do the same, save the “list-xpaths.xsl” file to your computer, and open up one of your docs. Choose Save As XML, and then check the box marked “apply transform”. Press the button labeld “transform”, and navigate to the “list-xpaths.xsl” file. In the File Name box, type “docxpaths.txt” (including the quotes, or you’ll get an .xml extension), and finally press “Save”.
Note that the title bar of the open doc will now (wrongly) display “docxpaths.txt”. Just close the open doc, then choose File -> Open, and open the docxpaths.txt file you just created.
This is just a very simple listing of the values of the “test” and “select” attributes. It’d certainly be possible to actually format this stuff out as an actual Word doc, perhaps in a table or something. For more on generating WordprocessingML with XSLT, see chapter 10 of my book (can’t resist a chance to drop in a plug).
-
WSAndrew77
AskWoody LoungerHi Barb,
The “Word .xml” documents you’re looking at are xslt stylesheets. (or at least also have elements named “for-each” with attributes named “select” which have values that are xpath expressions). Can you post one of these “Word .xml” documents?
-
WSAndrew77
AskWoody LoungerIf you just want to do things like list all the xpaths matched by for-each elements in an xslt stylesheet, I’d recommend xmlstarlet, a free command-line utility for processing/querying xml documents, available at: http://xmlstar.sourceforge.net/%5B/url%5D.
For example, if you had a stylesheet “foo.xsl”, and you wanted a list of all the xpaths used by for-each elements, you’d use the following command:
xml sel -t -m "//xsl:for-each/@select" -v "." -n foo.xsl
Not sure how comfortable you are with xml/xslt, but I’ve found xmlstarlet to be a lifesaver.
-
WSAndrew77
AskWoody LoungerHmm. As best I can tell, you’re viewing an XSLT stylesheet from within Word, which is why the value of the “select” attribute in the “for-each” element is an xpath expression. I had thought perhaps Word was dynamically generating the xpath for elements/attributes on the fly, but it just displays the value of the attribute, which in this case is an xpath expression.
Are you saying you’d like to view all of the xpath expressions used in the xslt stylesheet you’re viewing? Have you considered viewing the XSLT stylesheet from a plain text editor rather than from Word?
-
WSAndrew77
AskWoody LoungerAh, thank you very much for the screenshots, that helped quite a bit.
-
WSAndrew77
AskWoody LoungerI’m a bit unclear about your request. Please elaborate on what you mean by “mapping xpath”. I’m also quite confused by, “In Word, the XPath can be viewed in the attributes of the XML tags”.
Are you referring to WordprocessingML?
-
WSAndrew77
AskWoody LoungerHi Rich,
As usual, Hans is spot on with his solution. I also thought I’d post the following utility function, which collapses both end of the current selection, de-selecting both leading and trailing spaces,as well as paragraph marks (helpful when you select a word at the end of a paragraph). I use it quite a bit throughout some of my templates.
HTH,
Function ChompSelection(ByRef sel As Selection) If sel.Range.Characters.Count = 1 Then Exit Function sel.MoveStartWhile cset:=(Chr$(32) & Chr$(13)), Count:=sel.Characters.Count sel.MoveEndWhile cset:=(Chr$(32) & Chr$(13)), Count:=-sel.Characters.Count End Function
-
WSAndrew77
AskWoody LoungerSeptember 27, 2005 at 3:51 am in reply to: Track Changes – can you change the author (wordXP SP3) #975527See post 441718 .
HTH!
-
WSAndrew77
AskWoody LoungerAugust 30, 2005 at 12:42 pm in reply to: Wildcards search excluding a specified character (Word97) #969706Hi Dale,
Word’s wildcards are more powerful than most people realize, but they’re still rather limited. That kind of match is a bit more than it can handle on its own. The best you could probably do natively is to use some VBA to examine the matches to the original pattern to see if they include the substring, then act based on that.
Complex pattern matching in strings is not an uncommon task, and there are many tools far better suited for it than Word. You’re even further limited by still using Word 97. With Word 2000 and up, you have access to the VBScript RegExp object, which gives you access to a full Regular Expression (string-pattern matching) engine:
http://www.windowsdevcenter.com/pub/a/wind…dex.html?page=4%5B/url%5DGenerally, when complex patterns like this come up, I turn to other tools like Perl or Ruby:
http://www.perl.com/pub/a/2005/05/26/word_control.html%5B/url%5D -
WSAndrew77
AskWoody LoungerIf you search the VBA help for “InsertCrossReference”, the first result gives you your answer.
sel.InsertCrossReference _ referencetype:=wdRefTypeHeading, _ referencekind:=wdNumberNoContext, _ insertashyperlink:=true, _ referenceitem:=k
![]() |
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
-
default apps
by
chasfinn
2 hours, 55 minutes ago -
Will MS Works 4 work in MS Win 11?
by
MileHighFlyer
1 hour, 15 minutes ago -
Adding links to text in Word 2000
by
sgeneris
12 hours, 23 minutes ago -
FBI warnings are true—fake file converters do push malware
by
Nibbled To Death By Ducks
5 hours, 36 minutes ago -
Classic and Extended Control Panel — no need to say goodbye
by
Deanna McElveen
41 minutes ago -
Things you can do in 2025 that you couldn’t do in 2024
by
Max Stul Oppenheimer
6 hours, 2 minutes ago -
Revisiting Windows 11’s File Explorer
by
Will Fastie
1 minute ago -
Planning ahead for migration
by
Susan Bradley
5 hours, 9 minutes ago -
Yahoo mail getting ornery
by
Tom in Az
7 hours, 20 minutes ago -
Is Spectrum discontinuing email service?
by
Peobody
6 hours, 32 minutes ago -
Practice what you preach! A cautionary tale.
by
RetiredGeek
35 minutes ago -
Looking for Microsoft Defender Manuals/Tutorial
by
blueboy714
1 day, 19 hours ago -
Win 11 24H2 Home or Pro?
by
CWBillow
1 day, 5 hours ago -
Bipartisan Effort to Sunset the ‘26 Words That Created the Internet’..
by
Alex5723
2 days, 4 hours ago -
Outlook new and edge do not load
by
cHJARLES a pECKHAM
2 days, 16 hours ago -
Problem using exfat drives for backup
by
Danmc
2 days, 16 hours ago -
I hate that AI is on every computer we have!
by
1bumthumb
1 day, 18 hours ago -
Change Info in the Settings window
by
CWBillow
2 days, 23 hours ago -
Attestation readiness verifier for TPM reliability
by
Alex5723
3 days, 5 hours ago -
Windows Update says that “some settings are managed b your organization”
by
Ed Willers
2 days, 15 hours ago -
Use of Gmail rejected.
by
CBFPD-Chief115
2 days, 15 hours ago -
WuMgr operational questions
by
Tex265
15 hours, 35 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
3 days, 20 hours ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
2 days, 21 hours ago -
Backing up Google Calendar
by
CWBillow
4 days, 3 hours ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
4 days, 15 hours ago -
File Naming Conventions (including Folders)
by
Magic66
3 days, 14 hours ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
4 days, 23 hours ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
4 days, 9 hours ago -
Outlook 2024 importing Calendar and Contacts – FAILURE
by
Kathy Stevens
3 days, 16 hours ago
Recent blog posts
- Classic and Extended Control Panel — no need to say goodbye
- Things you can do in 2025 that you couldn’t do in 2024
- Revisiting Windows 11’s File Explorer
- Planning ahead for migration
- Woody Leonhard (1951–2025)
- What I learned from Woody Leonhard
- Windows Settings today
- Mail Merge magic in Microsoft Word
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.