John W. Colby
jwcolby at colbyconsulting.com
Sun Nov 7 19:36:55 CST 2004
Holy cow, is that a mish mash or what? The point of my questions was to try
to find a common ground where code could be stored and run from all of the
various office applications. Not to be it would seem. It does seem bizarre
that if I had some function that should be able to run in any of the apps I
have to save the same thing in 5 different places so that Access, Excel,
Word, Powerpoint and Outlook could use it.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
Sent: Sunday, November 07, 2004 2:03 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Modules and libraries in Office
In Excel you can store functions and modules as Public in .xla files.
Old Excel pre 97 didn't store the code in xla it
looked like an mde file. Matter of fact you can call these .xla files
from Access. I have called functions from the Excel Statistical and
Financial Analysis Packs.
In Outlook 2000 and any code that you create in the Outlook VBA
environment is stored in a file named VBAProject.otm.
Even though you can copy the VBAProject.otm file, that's not a good way
to distribute Outlook macros company-wide. The recommended method is to
create an Outlook or Word COM add-in. Talk to Shamil he has been
upgrading com addins to dotnet. http://www.outlookcode.com/d/vb.htm
http://www.outlookcode.com/d/comaddins.htm
Word uses templates either user or workgroup (to be shared) in a
specific folder
A template contain macros or other customizations such as toolbars, it
works better from some locations than others.
Again these com addin's can be used in place of macro's.
see
http://word.mvps.org/FAQs/index.htm
Just for future reference this method is also partially available under
word and excel
Under the Tools/References menu in the VBE, you need to check the Microsoft
Visual Basic for Applications Extensibility 5.3 object library. Microsoft
Visual Basic for Applications Extensibility 5.3 C:\Program Files\Common
Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB
The following code exports the contents of the Code Module to a file called
test.bas. This can be run from Word or Excel
Application.VBE.ActiveVBProject.VBComponents("Module1").Export("test.bas")
I think you can also import code this way but never tried it or got it
to work or something.
John W. Colby wrote:
>In Access we use MDA/Es to store libraries of reusable code. Is there
>an equivalent for Word / Excel / Outlook etc (the rest of Office)? Do
>these other platforms have references like we do in Access? If so, can
>you reference an MDA/E to use code in it?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com