开发者

Deploy Outlook UserForm

I made a userform to give out to colleagues.

The installation procedure goes approximately like this:

  • allow unsigned macros
  • 开发者_Python百科
  • open VB Editor
  • add 2 references by manually navigating to the .ocx / .tlb files (needed for Treeview control)
  • import form
  • create a new module
  • copy a procedure into that module (hook for button, contains essentially MyForm.Show)
  • run another proc to create toolbar button
  • save, restart

My plan was to make an install script; but I found Outlook's VBProject is sealed tight against any automated access.

How can I make that installation procedure simpler?


As microsoft wrote here:

https://support.microsoft.com/en-us/help/290779/managing-and-distributing-outlook-visual-basic-for-vba

If you are developing a solution that you intend to distribute to more than a few people, you should convert your VBA code into an Outlook COM or VSTO add-in or an Office add-in for Outlook.

Outlook macros are not made to be deployed so you will always have troubles deploying them to users as they will need to make too much actions as you described.

To avoid that, I recommend you to look at VSTO add-ins and ClickOnce. Here are the links:

VSTO

https://learn.microsoft.com/en-us/visualstudio/vsto/getting-started-programming-vsto-add-ins?view=vs-2019

ClickOnce deployment

https://learn.microsoft.com/en-us/visualstudio/vsto/deploying-an-office-solution-by-using-clickonce?view=vs-2019

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜