Using old macro not working in 2010? - vba

I was trying to run a macro that was designed in for Microsoft Office 2003; however it will not work in Office 2010. Is there a wrapper or some sort of way that I can enable the Office 2010 to read the code?
Thanks for your help and please explain in layman's terms since I really don't have extensive programming knowledge.

You probably need to install the VBA Converter Pack. Follow the link at the top of the support page to download the hotfix.
http://support.microsoft.com/kb/926430/

Related

Converting powerpoint VBA add-in (.ppam) to COM add-in (.dll)

I have created a working Powerpoint add-in (.ppam) that offers several time saving features, and added a custom UI ribbon tab to improve accessibility.
As I look to distribute this add-in to users, I'm looking to improve code security by compiling it into a COM add-in (.dll) via VS Express.
I have looked all over the web for documentation on this, and have found some promising source, such as:
http://www.cpearson.com/excel/creatingcomaddin.aspx
Unfortunately, nearly everything I find appear to be quite outdated and based on Office XP or 2003, when I'm looking at Office 2010. I'm probably doing something wrong here, but I'm having trouble replicating their instructions on my end, running into errors like being unable to add a reference library or the code they suggest is not recognized. I actually am even unsure how to open for example the sample VB project that the Pearson site provides from the link above to imitate. I think all this may be because of the different versions of Office and Visual Studio, but could certainly be wrong.
Could anyone point me in the right direction? My understanding is that it's actually quite simple to convert the code from VBA to VB (just involves adding "Powerpoint.Application." in front of things like "activewindow"). So I just need to figure out how to convert a very simple VBA add-in into a COM add-in in VS Exp 2012 for Office 2010, and then can leverage the process to convert the full add-in.
Apologies if I'm using any of the terms incorrectly.

outlook addin: how to I develop my own one?

I am afraid this is an untypical "unspecific" question...
I have a lot of code in Outlook, and this should also be used by other users. Up to now I am exporting the modules and forms from my Outlook, and import them on the other machines. But this of course is quite a hassle on every change.
So I thought about turning them into an adding - easy to do for example for Excel...
I have done some Research now and the following questions are left:
is it right that the only software really useful is Visual Studio?
i did download the Trial Version of Visual Studio, and digged into it... but it seems I can not copy/paste the existing code, but there are a lot of changes necessary in the code - is that right? Is there a Kind of "translation" for the most common things?
Thanks for your answers,
Max
Not sure if by trial version you mean Visual Studio Express which you can find here:
http://www.microsoft.com/visualstudio/eng/downloads#d-2013-express
In any case this should allow you to copy/paste your code. Also if you are a student/academic you can download the full version for free (https://www.dreamspark.com).
If you don't want to use VS, you could try SharpDevelop and NetOffice as an alternative.
I wrote a series on my blog about how to create an add-in for Outlook. There are quite specific instructions on how to get started, pitfalls I encountered along the way and tips/tricks to help you.
Here is where the series starts: http://www.midniteblog.com/?p=6. You can see all the links for the series here: http://www.midniteblog.com/?s=outlook.
Hope this is helpful for you!
P.S. You definitely want to use Visual Studio for a project like this because of the nature of Microsoft product integration.

VBA Compatibility between different Office Versions

Sorry if this is a silly question.
What can I do to make my VBA code work on Office 2003/2007/2010 ?
Can it be done or should I create different VBA code for each?
I use
WinHttp.WinHttpRequest.5.1
Make a lot of Windows API Calls
Have five references to libraries
wininet.dll
kernel32
Outlook.Application
InternetExplorer.Application
I'm developing on Office 2007 but users with Office 2010 cant run the code. Not sure about users runnning other office versions.
I have also seen that one can create an Excel-Addin in Visual Studio but I dont have a lot of experience in that area.
Thx for any suggestions.
for different versions of Excel, you can just use Conditional Compilation such as #If Application.version>n then
However, for any users who have Win64 systems, you will have to provide different methods of calling the API functions.
Your best bet is to try and manipulate Excel using Automation either from .NET using Office.Interop, or VSTO.

Excel vba project in VB.NET

I am now engaging in an excel vba project. It's a excel front interface for the workers in a site with an Access database in the company network. I dont like much the VBE in Excel 2007, so im wandering if I can do this with VB.NET, which seems to be a more adorable IDE. And where can I find some resources on this? Or recommanded books? Thanks!
Im using Excel 2007 et VB.NET 2008
You could also try Excel-DNA (free). There are many other products out there too. You can make it work with VB.Net Express also, you just need to add a reference to your excel SDK. Also, Add-in Express looks pretty nice. I've never tried it though (costs money).
I think you are looking for Visual Studio Tools for Office: VSTO.
This allows you to develop using VB.NET (or indeed C#) but with full access to the Office automation facilities.

outlook programming with C#

I am planning to do an add-ins project for Outlook 2007. I am pro developer in C#, WPF.
Please suggest books or sites for me to learn Outlook programming with C#. Any help would be appreciated.
Thanks.
Professional Outlook 2007 Programming ISBN:9780470049945
Programming Applications for Microsoft Office Outlook 2007 ISBN:9780735622494
I am NOT an employee of this company - but I really really like Add-In Express (http://www.add-in-express.com/).
It basically lets you write WinForms style code, embed your WinForms components, deploy and update using ClickOnce (HUGE feature), supports multiple versions of Office products, no VSTO dependency or deployment necessary, easy designer, standard automation model.
To answer your question, reading their tutorials and documentation was sufficient to get started doing extensive Office/Excel/Outlook dev.
Like anything, it has its bugs, but I really like it.