Word 97 Automation?

P

Peter Karlström

Hi

I have a probling porting a Office 2000+ application to Word 97?

Below is a short problem description.

I Have a AutoExec macro which loads from Words Startup folder. with the
following code:

+++++++++++++++++
Public wrdApp As Word.Application
Public wrdObj As Object
Sub AutoExec()
Set wrdObj = CreateObject("OffClass.WordAddIn")
Set wrdApp = ThisDocument.Application
wrdObj.initHandler wrdApp
End Sub
+++++++++++++++++++++

The COM-component (OffClass.WordAddIn) then creates a menu and some
toolbar-buttons.
In the Office 2000+ application I use the WithEvents declaration for
Office.CommandbarButton to capture the Click-Event of the menu/button.

Is there a way to create a similar function for Word 97?

Thanks in advance
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?UGV0ZXIgS2FybHN0csO2bQ==?=,

Word 97 does not and cannot support COM-Addins. Period. So no, you can't
do this with Word 97.
I have a probling porting a Office 2000+ application to Word 97?

Below is a short problem description.

I Have a AutoExec macro which loads from Words Startup folder. with the
following code:

+++++++++++++++++
Public wrdApp As Word.Application
Public wrdObj As Object
Sub AutoExec()
Set wrdObj = CreateObject("OffClass.WordAddIn")
Set wrdApp = ThisDocument.Application
wrdObj.initHandler wrdApp
End Sub
+++++++++++++++++++++

The COM-component (OffClass.WordAddIn) then creates a menu and some
toolbar-buttons.
In the Office 2000+ application I use the WithEvents declaration for
Office.CommandbarButton to capture the Click-Event of the menu/button.

Is there a way to create a similar function for Word 97?

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 :)
 
P

Peter Karlström

Hi Cindy

Actually, I found a way.

If I just added one sub for each menyoption/button in the startup template
and used the .OnAction property of the CommandBarButton object to point at
the macro-sub I got it to Work.

Thanks anyway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top