Overriding Word Commands on the Horizontal Scrollbar
One of our partners asked around on an internal discussion alias looking for a way to disable the little buttons that appear on the horizontal scrollbar in Word:
The way to disable these buttons is by overriding the Word Commands via an empty VBA macro. You can add the macros to a template or a doc. Here are the macros I tested:
Public Sub ViewWeb()
End Sub
Public Sub ViewNormal()
End Sub
Public Sub ViewPage()
End Sub
Public Sub ViewOutline()
End Sub
Public Sub ReadingMode()
End Sub
Public Sub ViewOutlineMaster()
End Sub
Public Sub ReadingModeMini()
End Sub
Now, the buttons show, but they do not work. Big thanks to Allen on the Word product team for letting me know about this technique.
Rock Thought for the Day: My sons had a better computer than the one I regularly used. Theirs is faster and better in every way. But, I use mine for sound editing with my M-Audio Delta 1010LT card. Very cool card if you want to do home recording. I recently did the ol' switcharoo and ported all of my stuff to their computer and their stuff to my computer. They've been pretty nice to not complain about it.
Rock On
Comments
- Anonymous
August 23, 2005
John - this has nothing to do with your current blog entry, this goes back to a presentation you gave at TechEd this year. I got my presentation DVDs today, and I was working through some of the stuff you presented in "Programming Microsoft Office Word XML". I was trying to create an XSLT from a WordML file using wml2xslt, but I'm getting an error. I started with this XML file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<log xmls="logs">
<logon>Logon</logon>
<shutdown>Shutdown</shutdown>
<restart>Restart</restart>
<logoff>Logoff</logoff>
</log>
Open it in Word 2003 Pro, bold the "Logon", highlight "Shutdown", then save it out as an XML file as "seed4.xml", then run "wml2xslt seed4.xml" and get "Error: No XML markup found".
I know you are busy and not in the business of debugging other people's code, but I can't find any reference to this in the groups or anywhere, so I hope you can help. I didn't include the XML produced by Word when I save it out, because it is somewhat long and messy, but hopefully I've included enough info that you can read this and quickly point out my mistakes.
Thanks, I really rook a lot from your presentations this year and have enjoyed your blog since then! - Anonymous
August 23, 2005
Disabling is easy - I have devised a mechanism to enabled buttons turned off by the Document Protection function. There is no way to control what is protected or allowed when protecting styles. In my case we only want to restrict what paragraph styles can be applied but don't care if character styling is applied to a text run like bold or font color. So I've enabled things like the bold, italic and underline tool bar buttons. I have also enabled other menu items that I want on too.
This is all part of our Word XML and XML Content Management System integration. For more see http://www.dmsi-world.com - Anonymous
September 13, 2005
Hi - same issue as Dan here, the inference tool doesn't work for me. Error: No XML Markup, even though I can see all the tags in Word. - Anonymous
September 14, 2005
WordML Inference issues fixed with a name space. Dan - you just need xmlns="smart"> in your root tag and away you go.