Using a Class and Intellisense without ActiveX?

L

Little Bear

I´m planning to make a Class with some routines i use a lot in many
templates. First i was thinking of making the class in my startup-template
and let other templates have a library-reference to it but then a cannot
initialize the class using:
Dim myC as StartUpTemplateName.ClassName
Set myC = New StartUpTemplateName.ClassName
Errormessage: "Invalid use of keyword New"
(Translated from the Swedish error message :)

I have also tried to create a Add-In with the same result.
The only way I know to make any template to use my Class is to create a
ActiveX-dll and registrate it using Regsvr32.

Is there a way to make a Class i a startup-template wich is usable from any
other template loaded by users?
 
C

Cindy M -WordMVP-

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

I don't think so. At least, not at the level you're looking for. As far as
I've ever been able to figure out, IF I have a valid reference to a loaded
template file (call it X), I can directly work with any procedures and
functions located in the ThisDocument class module (X.DoThis), using
Intellisense. I've never tested it, but perhaps you can create objects using
your class at this second level (X.ClassObject)? That would be the only
possibility, I think.
I´m planning to make a Class with some routines i use a lot in many
templates. First i was thinking of making the class in my startup-template
and let other templates have a library-reference to it but then a cannot
initialize the class using:
Dim myC as StartUpTemplateName.ClassName
Set myC = New StartUpTemplateName.ClassName
Errormessage: "Invalid use of keyword New"
(Translated from the Swedish error message :)

I have also tried to create a Add-In with the same result.
The only way I know to make any template to use my Class is to create a
ActiveX-dll and registrate it using Regsvr32.

Is there a way to make a Class i a startup-template wich is usable from any
other template loaded by users?

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

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