MartyConnelly
martyconnelly at shaw.ca
Sun Nov 7 13:02:38 CST 2004
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