Outlook 2010 macros not working on Outlook 2007

124 views Asked by At

i have some macros that use Environ:

Call AddButton(oCBsubmnuMails, newBtn, "Change13", "CONF") ' , Environ("APPDATA") & "\Microsoft\Templates\Document Themes\" & "iconSP4.bmp"

The problem is that i have Outlook 2010 and all works but if i transfer the VbaProject on a PC that has Outlook 2007 it will not work.

1

There are 1 answers

0
Eugene Astafiev On

It looks like the specified file doesn't exist on the machine with Outlook 2007 installed.

In such cases I'd recommend breaking the chain of property and method calls and declaring them on separate lines of code, so that you could debug the code and see intermidiate values.