Hi Raj,
i need to make sure that the reviewing tool bar is open when i execute word
from my c# program. What is the api that i need to call and what parameters
do i need to pass? Where can i find detailed API list for office 2003
programming with .net?
Well, the closest source for the object model is to open the application in
question, press Alt+F11 to open the Visual Basic Editor, then search the Help
from within that. You can also access/download the applications' Help files
from the MSDN site, but you need to be aware that all the documentation is
written for the native programming language (VBA). There is no .NET version of
the object model Help files (what you refer to as the API).
If you're unfamiliar with syntax, the quickest way to get the basic objects and
methods you want to use is to record an action in a macro (Tools/Macro/Record
New Macro). Once you stop the recorder, Alt+F11 to go to the VB Editor and look
in the "New Macros" module at the result.
Here's the result of my displaying the Reviewing toolbar:
Sub ShowReviewingToolbar()
'
' ShowReviewingToolbar Macro
' Macro recorded 20/11/2006 by Cindy
'
CommandBars("Reviewing").Visible = True
End Sub
This tells you you need to pass the index "Reviewing" to the CommandBars
collection (that's a property of the WordApplication, BTW) to obtain a single
CommandBar object. Then set its Visible property to True.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail
