Monday, July 27, 2015

the macro cannot be found or has been disabled because of your macro security settings(BI Publisher office 2010 and 2007)

Recently I have upgraded MS Office from 2007 to 2010. As I work on some BI projects, part of mine set of oracle programs is oracle BI Publisher Desktop, which use Word as report template designer. When I run BI Publisher macros in Word 2010 I got following error:



When I google term it seems that all advices were not useful. Here are two most common errors and how should Word be setup correctly:


Templates were correctly enabled:

But in Windows event viewer, curious error was more than obvious:



The solution

The solution shown here really works (tested on several computers), so I'm writing this down to be more like documentation for future reference to anyone stack on this case. Idea is to remove old *.EXD files from any location in %USERPROFILE% folders that might exists.
Because mine praxis is to have separate %USERPROFILE% folder location then where are OS files (different then partition then C:), exd file was found as shown. In mine case it was only in one folder:
D:\Users\DamirV\Application Data\Microsoft\Forms>dir
 Volume in drive D is Data

 Volume Serial Number is 505E-794F

 Directory of D:\Users\DamirV\Application Data\Microsoft\Forms

01.02.2011  11:45    <DIR>          .
01.02.2011  11:45    <DIR>          ..

12.03.2009  15:17           165.808 MSComctlLib.exd
31.08.2010  10:34            11.776 WINPROJ.box

01.02.2011  11:19             7.168 WINWORD.box
               3 File(s)        184.752 bytes

               2 Dir(s)  51.699.859.456 bytes free

D:\Users\DamirV\Application Data\Microsoft\Forms>
So all you have to do is:
Rename existing "MSComctlLib.exd" file to "MSComctlLib.exd_bak"
Open Word 2010
Open menu Add-Ins|Oracle BI Publisher|Log On
Last action will create new MSComctlLib.exd file in background:
D:\Users\DamirV\Application Data\Microsoft\Forms>dir
 Volume in drive D is Data

 Volume Serial Number is 505E-794F

 Directory of D:\Users\DamirV\Application Data\Microsoft\Forms

01.02.2011  11:45    <DIR>          .
01.02.2011  11:45    <DIR>          ..

01.02.2011  13:51           167.456 MSComctlLib.exd
12.03.2009  15:17           165.808 MSComctlLib.exd_old

31.08.2010  10:34            11.776 WINPROJ.box
01.02.2011  11:19             7.168 WINWORD.box

               3 File(s)        184.752 bytes
               2 Dir(s)  51.699.859.456 bytes free


D:\Users\DamirV\Application Data\Microsoft\Forms>

Notice different file size and file date of "MSComctlLib.exd". This is now Office 2010 version of EXD file which was not able to be created because of previous version. And that is all.



The EndIf you have upgraded several Office versions (i.e. 2000->2003->2007->2010), you might find ".EXD" files as well in following folders:
%USERPROFILE%\Application Data\Microsoft\Forms
%USERPROFILE%\Local Settings\Temp\Excel8.0

%USERPROFILE%\Local Settings\Temp\VBE
%USERPROFILE%\Local Settings\Temp\Word8.0
Like in previous example rename them and later (when you are sure that all works) you may delete.

Hope this helps!

Cheers!
Post festum part-IMPORTANT!!!
I have received many asks that people complaint about this issue was resolved and later after some Windows updates, all is back to same problem.
For them I have wrote this part what should help them.
Again first step is to rename all .exd files.
For 64-bit operating systems, type the following:
Regsvr32 "C:\Windows\SysWOW64\MSCOMCTL.OCX"
For 32-bit operating systems, type the following:
Regsvr32 "C:\Windows\System32\MSCOMCTL.OCX"
Restart your machine.


No comments:

Post a Comment