tags:

views:

55

answers:

2
+1  Q: 

MS Office Add On

Hi,

I want to add on certain feature in MS Office. Currently, I am looking at VBA to develop it. However, it seems that running macros requires security disabled. This means that if I distribute the VBA program, other people need to enable macros to run. (Security issues)

The problem now is, how do I distribute the VBA that I wrote? E.g. in a .exe file? And is there any other method to go about creating this add on?

I downloaded some add on for MS Word and it seems that it is written in C++ and it is in .dll format.

Thanks.

+1  A: 

You can run macros in a document/template/add-in even in "high" security mode, if:

  • the VBA project is digitally signed
  • the user agrees to 'trust' the publisher of the digital signature

The first time the user runs a macro signed with your digital signature, they'll get a prompt saying "the macros are signed by YourCompanyName - do you want to trust all add-ins from this publisher". If they click "yes", they won't see the prompt again - and your macros will run.

See this link for details of how to create a digital signature.

Gary McGill
+1  A: 

Visual Studio Tools for Office (VSTO) allows you to author extensions to Microsoft Office using any .NET language, including Visual C++. Such extensions would indeed compile to DLL-files, and after installation on a client machine, they wouldn't require the user to dismiss any additional security warnings. You will need Visual Studio 2005/2008 Professional in order to use the VSTO framework.

Wikipedia has more information about VSTO, including a comparison with VBA. Amazon seems to have a fair amount of books on the subject as well.

Jørn Schou-Rode
If I were to use VSTO, do I still need to have a digital signature in the program?
Krimmel
Not sure. I hope someone with more insight in VSTO can help us here...
Jørn Schou-Rode
VSTO is getting there, but it's still *much* harder than developing in VBA.
Gary McGill
And slower.... http://www.codematic.net/Excel-development/Excel-Visual-studio/visual-studio-excel.htm recons 10x than VBA and 20x C++But since it is the future, it's worth considering :) I know my VBA toolkit is mostly made of things i wrote in the last 10 years.
Mark Nold