Recently got a new laptop running 64-Bit (Windows 7 and Office 2010) and everytime I open the BAT template it crashes and opens visual basic. It has the following error (also see attached screen shot): Compile error: The code in this project must be updated for use on 64-bit systems. Please review and update declare statements and then mark them with the PtrSafe attribute.
I get this when my mouse moves over column C or D to click on "Create File Format".
Anybody have a fix for this?
I have the same issues. I had to load excel 2007 on my laptop with the office 2010 so I could use it for BAT. Not a great option, but it works until it is updated at cisco.
Well, I'm sure you've figured out that you are up against incompatibilities with Excel 2010 and 64-bit software.
I fixed the VB code and I am no VBscript expert. I found this link to an Excel programming site:
When my error popped open the VB editor I simply did a find and replace - "Declare Function" replaced with "Declare PtrSafe Function" and I said to replace within the entire project. It made 3 replacements and i was able to generate the phone templates successfully.
The problem with this 'fix' is that the functionality the code giving the error isn't working anymore. The code gives you a dialog to browse for a folder to save your export to. Just replacing the functions will result in a crash of Excel when you click the browse folder on the Export to BAT format dialog. This is no problem is you use the default path or manually type the path you want to use to save the file.
On my blog at Fix BAT tool for CUCM with Office 2013 64 Bit you can read about my fix which won't break the functionality of the "browse" button.
I mixed both approaches and it works like a charm. If you are using Office 2010 instead of 2013 then you need to look for the Microsoft Office 14.0 Object Library, but otherwise this was a simple fix and works for Office 2010 64-bit as well.
Can you tell me how you mixed both approaches? Because there are very different, one just makes sure you don't get an error message (and breaks functionality of the "Browse" button) while the other rewrites the functions so everything should work as expected.
BTW: Thanks for the update on the Object Library for Office 2010, I will update my post soon with this information.