-
WSmandelbrot
AskWoody LoungerNovember 21, 2008 at 2:46 pm in reply to: Limitation of Ribbon Control Repurposing (Word 2007) #1134180oops. I did not read this article.
Thank you very much. In previous versoins of Word, we can write macros with the same names as built-in commands to intercept them. It also worked for buttons only. I thought the new Word version should be more powerful.Now it seems to be just a change of interface.
I do not understand why MS stops at this step. It allows me to override the Bold button, but does not do the same thing for the change of Font Size.
-
WSmandelbrot
AskWoody LoungerThanks Hans. That solves my puzzle.
Are there any information that clears lists which VBA methods are not available when which dialogs are active?
-
WSmandelbrot
AskWoody LoungerI did more tests and got some detailed information.
When the spelling and grammar check dialog is active, I can only perform Range.Delete in the active document. While I tried to do so in an inactive document, it failed. I tried it in a VBA macro, it pops out a message: ” This method or property is not available because the proofing dialog is active.”
I cannot see any logic behind this rediculous limitation. I cannot activate a document just because I want to access it. Is there any way to avoid this problem?
Thanks
-
WSmandelbrot
AskWoody LoungerOctober 18, 2006 at 7:48 am in reply to: Office API controlling Clipboard (Microsoft Office 2003) #1034060Hi, StuartR,
The approach works perfect when I get things out from a document. However, when I tried to put data back into the document, problems occurs.
When I tried to put the data into the temporary document with
Document.HTMLProject.HTMLProjectItems(1).Text = Something
Data do not appear in the document (neither in the interface or from the API) until I call Document.HTMLProject.RefreshDocument. The RefreshDocument method has a series of sideeffect. First, the refreshing process is slow. Second, I hid the temporary document before, but this function call make it appear. Although I can hide it again, the flashing effect is undesirable. Finally, after this method is called, the Document object becomes unavailable. I have to get this object back, which is troublesome.
Any suggestion is appreciated.
Thanks
-
WSmandelbrot
AskWoody LoungerSeptember 5, 2006 at 8:35 am in reply to: Office API controlling Clipboard (Microsoft Office 2003) #1027347Thank you very much, StuartR. This solved the problem that has puzzled me for months.
I save the user input into a file and later replay it to Word to simulate an editing session, so I need the content to be self-contained and can exist independent of Word. With the HTML text and Selection information, I can achieve this purpose now.
-
WSmandelbrot
AskWoody LoungerSeptember 5, 2006 at 5:35 am in reply to: Office API controlling Clipboard (Microsoft Office 2003) #1027332Thank you, StuartR.
This approach is able to provide me the whole document. However, what I want is only a small section of it. For example, the shape the user just created. With a whole document in HTML, I have to integrate a HTML parser to get the correct content. And for a long document, getting the whole document might be slow.
-
WSmandelbrot
AskWoody LoungerSeptember 5, 2006 at 4:02 am in reply to: Office API controlling Clipboard (Microsoft Office 2003) #1027324My program moinitors the user’s actions in the Word document, and tries to get the what the user has inserted in the document (e.g. rich formated text, clip arts or shapes). The only way I currently know to get data out of a Word document is to copy it to the clipboard and read it in RTF format. Now copy is done with Word API (e.g. Range.Copy), and clipboard reading is done with Windows API (i.e. the DataObject).
In this way, I can only use the first clipboard, which overlaps with the Windows clipboard. So I have to backup the clipboard content before copying and restore it afterwards. Since Word has so many clipboards, I feel my current approach a waste.
After all, my final purpose is to get part of the document (e.g. a Range) out of the document (e.g. a RTF string). If there are other ways to do it, I can avoid using the clipboard.
Thanks.
-
WSmandelbrot
AskWoody LoungerJune 22, 2006 at 5:52 am in reply to: AutoCorrect.CorrectSentenceCaps doesn’t work (Word XP/2003) #1017299Thank you very much. It solves the problem.
-
WSmandelbrot
AskWoody LoungerI also noticed that the old comment pane appears when I created the comment with VBA. Although this pane looks slightly different from the comment pane in Word 2000, the Selection object still works. But this pane only appears while a comment is created in this way. In other cases, I always get the new reviewing pane. It seems that MS is interested in producing fancy features rather than making them stable.
-
WSmandelbrot
AskWoody LoungerI also noticed that the old comment pane appears when I created the comment with VBA. Although this pane looks slightly different from the comment pane in Word 2000, the Selection object still works. But this pane only appears while a comment is created in this way. In other cases, I always get the new reviewing pane. It seems that MS is interested in producing fancy features rather than making them stable.
-
WSmandelbrot
AskWoody LoungerUnfortunately, this is a template. I cannot use the COM Add In because there are macros overriding Word built-in commands.
-
WSmandelbrot
AskWoody LoungerUnfortunately, this is a template. I cannot use the COM Add In because there are macros overriding Word built-in commands.
-
WSmandelbrot
AskWoody LoungerThat makes sense for the problem.
Thanks -
WSmandelbrot
AskWoody LoungerThat makes sense for the problem.
Thanks -
WSmandelbrot
AskWoody LoungerHi, Jefferson. Do you something like this attatchment? In this document, there are some sample macros. SetHook( ) tries to set an event hook for the font color button. However, when I assign that control to a button variable, the VB interpreter says that “type mismatch”. In fact, it is not a “msoControlButton” but a “msoControlSplitDropdown”. Although a variable of msoCommandBarControl type can handl it, but such a variable does not any event.
Actually, I found 3 approaches to intercept the commands for Word. The first 1 is to set the event listeners for buttons. The second one is to change the onAction attribute. The last one is to create overriding macros with the same command name. None of them is a complete solution, but I am considering whether a combination would meet my requirement.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
3 hours, 38 minutes ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
6 hours, 19 minutes ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
54 minutes ago -
Windows Update orchestration platform to update all software
by
Alex5723
13 hours, 39 minutes ago -
May preview updates
by
Susan Bradley
1 hour, 2 minutes ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 hours, 13 minutes ago -
Just got this pop-up page while browsing
by
Alex5723
5 hours, 50 minutes ago -
KB5058379 / KB 5061768 Failures
by
crown
2 hours, 55 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
4 minutes ago -
At last – installation of 24H2
by
Botswana12
1 day, 5 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
16 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
1 day, 17 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
1 day, 10 hours ago -
Limited account permission error related to Windows Update
by
gtd12345
2 days, 6 hours ago -
Another test post
by
gtd12345
2 days, 6 hours ago -
Connect to someone else computer
by
wadeer
2 days, 1 hour ago -
Limit on User names?
by
CWBillow
2 days, 4 hours ago -
Choose the right apps for traveling
by
Peter Deegan
1 day, 18 hours ago -
BitLocker rears its head
by
Susan Bradley
1 day, 2 hours ago -
Who are you? (2025 edition)
by
Will Fastie
1 day, 1 hour ago -
AskWoody at the computer museum, round two
by
Will Fastie
1 day, 20 hours ago -
A smarter, simpler Firefox address bar
by
Alex5723
2 days, 17 hours ago -
Woody
by
Scott
3 days, 2 hours ago -
24H2 has suppressed my favoured spider
by
Davidhs
1 day, 2 hours ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
3 days, 16 hours ago -
MS Office 365 Home on MAC
by
MickIver
3 days, 10 hours ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
4 days, 6 hours ago -
Flash Drive Eject Error for Still In Use
by
J9438
1 day, 1 hour ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
5 days, 1 hour ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
5 days, 1 hour 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.