View Single Post
  #11   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?U2xvdyBMZWFybmVy?=,

Sorry about the late response. I was away for the holidays and am still playing
catchup...

I would like to try this out.
I have the button in the 'other' application (in this case a .mdb file)
which opens MSWord.
Next would be the addin or COM and I would like to see an icon on the
standard toolbar that everyone would have open which when selected takes the
person back.

Easiest would be to create a Word template, saved to a specific location, that
contains the toolbar+macro code to go back.

When your code in Access starts up Word (I'm assuming you're using GetObject,
CreateObject, or the New keyword to do this), then you can load the Addin like
this:

Dim addin as Word.Addin

Set addin = WordApp.Addins.Add "C:\path\filename.dot", False
WordApp.CustomizationContext = Templates(addin.Path & "\" & addin.Name)
WordApp.CommandBars("Name of toolbar").Visible = True

Assuming, when the user should return to the Access database, that the document and
Word application should be closed, first call the Access stuff and bring it to the
front. Then

WordApp.Quit SaveChanges:=WordApp.wdDoNotSaveChanges

1. From the "other application" you click a button that automates Word and opens
the document.

2. At the same time, it also loads an Addin (could be COM or template). This
addin basically adds a toolbar, toolbar button and/or menu command (you choose)
bound to VBA code that will do what you envision.



Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)