Tab Change Event

  • Thread starter Thread starter john
  • Start date Start date
J

john

I have msWord as an embedded object on a tabbed form, the 1st time I click
on its tab the change event fires the below code and opens word in edit
mode. If I click another tab it automatically exits word from edit mode. But
the next time I click on msWord's tab, it does not open into edit mode. I
know it is fires the event for it because I still get the message box, but
does not automatically open word. Any suggestions on the code.

I would also like it to insert a bookmark at its current position on close,
but word as an embedded object, won't fire any of its own Marcos, so any
ideas there would be helpful.

Also is there a way to test to see if word is in edit mode or not?

DoCmd.DoMenuItem acFormBar, acEditMenu, acObject, acObjectVerb

MsgBox "Hot-keys Ctrl+z Goto Bookmark, Ctrl+b Insert Bookmark"
SendKeys "^z", False
 
You're trying to get Access to trigger events that are stored in embedded
Word documents? I'd have to say that, at a basic level, I don't like the
idea. Controlling stuff from a single program is always going to be less
prone to errors/conflicts/timing problems so I'd suggest looking after
everything that you want via code build in to Access.

That's the basic answer. From a practical level I can't tell what it is
that you're attempting to do... it'll probably be worth reposting that as a
separate question.
 
Back
Top