Home
TeamSite
Front-End Profiling
po8crg
I'm currently writing a suite of add-in functionality for Word (2003, if it matters) for a law firm. I'm developing this in VB.NET 2005 as a COM Add-In to Word. This functionality replaces masses of VBA macros that were written for Word 2000.
One feature that was available in Word 2000/VBA was front-end profiling, whereby an event fired whenever a user created a new document (this is a normal Word event) and the save screen automatically came up.
I can get at the event from my add-in, but I can't manage to get the save screen to come up. The code in VBA that did this was:
' Get the menu.
Set objMenuBar = objApplication.CommandBars("File")
' Get the save button.
Set objSaveButton = objMenuBar.FindControl(ID:=748)
' Press the save button.
objSaveButton.Execute
I've tried various ways of doing the same thing (ie pushing the "save" button), but all of them do a local save, rather than saving to WorkSite.
I've checked, and doing it from VBA does the right thing, but calling what is, as far as I can tell, the same function from an external DLL does the wrong thing.
Is there a way I can do this, eg through IManExt/IManExt2, or am I going to need to have a tiny bit of VBA code that I call from the DLL?
Find more posts tagged with
Comments
jny
It's possible that WorkSite's COM AddIn (Office Integration code) is not yet loaded before your AddIn is loaded. Try naming your AddIn alphabetically after WorkSite's.