none
VBA Code in ThisOutlookSession RRS feed

  • Question

  • I have modified Application_ItemSend(ByVal Item As Object, Cancel As Boolean) inside ThisOutlookSession and distributed the code to others. 

    I am aware that this code DOES NOT LAUNCH AUTOMATICALLY UNTIL VBA editor has been opened and closed (Alt+F11, Alt+F11).  That has worked initially (although a pain) for users.  However, I have reports of user(s) where the ItemSend code works for about a week and then quits working until the Alt+F11 routine is performed again.  This is very annoying to the attorney (who refuses to do it again).

    It is imperative that we have this code functionality due to how we reply to internal voicemails.

    Why is the code suddenly failing to execute?

    I tried to write a fix that would open/close VBA editor, but this does not seem possible in Outlook (although it is in Word).

    Any ideas?

    Friday, September 12, 2014 9:06 PM

All replies

  • Did you have a chance to check out the Trust Center settings? Anyway, I'd suggest developing a COM add-in instead. Macros are not designed for distributing the code on multiple PCs. See "Walkthrough: Creating Your First Application-Level Add-in for Outlook" at http://msdn.microsoft.com/en-us/library/cc668191.aspx .
    Saturday, September 13, 2014 4:21 AM
  • I was create menu/icon from VBA procedure. To run it, you should to use [Alt+F8]. That is enough to start process autorun redistributed VBAProject.otm file.

    In starting procedure I was chceking user security settings (I know bad habit search in registry) and switch to "trust" macros.

    For some security you can use "run macros secured by key", and send to colleagues via mail.

    When User can not see my Icons bar - know to push [Alt+F8] - and that is all story.

    In active directory you can set security on start, add file or replace newer version. You can create instalaction file too.


    Oskar Shon, Office System MVP - www.VBATools.pl
    if Helpful; Answer when a problem solved

    Tuesday, September 16, 2014 8:39 AM