loganscott2000


Hey, everyone. We have several (dozen!) Word template files that contain a LOT of VBA code. We are evaluating the benefits/risks of converting these docs to Office 2007.

That said, my questions are:

1. Are there any known issues with converting them to 2007 Specifically, if I just open the file (and convert it) to 2007, is my code going to *** out on me

2. Do I have to convert (or rewrite) the VBA code into VSTO/VSTA

Any assistance you guys can give me would be GREATLY appreciated!!!

Thanks!!

Logan 5 Scott (yeah, that's really my name...)




Re: Question about VBA and Office 2007

Jon Peltier


Logan -

I don't know of any specific issues in Word. In Excel the vast majority of legacy code works as expected in 2007. The notable exception of course is anything that affects the menu/commandbar interface of Office 97-2003. In addition, chart and shape related code in Excel may not work as intended. You would have to test everything, of course.

You do not need to convert any existing working routines from VBA to VSTO/VSTA/dot-net, despite all the noise from Microsoft.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______






Re: Question about VBA and Office 2007

magicalclick

Hi, I am interested in moving my VBA for Excel to .Net. But it seems like the editor comes with Excel 2007 only does VBA and I am not sure if .Net code can be run on Excel 2003 or not.




Re: Question about VBA and Office 2007

Jon Peltier

What's your rationale for moving to .Net For most Office-type programs, VBA is perfectly adequate, and .Net is overkill. I have heard of issues deploying .Net solutions, whereas VBA solutions are generally pretty easy to deploy.

.Net and VSTO can be used on Office 2002, 2003, and 2007, each requiring a separate PIA. The .Net code is not generated in the Office VBIDE, but in VS or VSTO.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______





Re: Question about VBA and Office 2007

Luiz Claudio - MVP

You can create VSTO solutions for Excel 2003 if your users have Office Professional Edition or Excel standalone. VSTO solutions will not run on Office Standard version.

.NET code is written in Visual Studio, not in Office.






Re: Question about VBA and Office 2007

magicalclick

My reason is that I prefer C# syntax and the build-in functions. VBA functions has certain strange convertion precision behavior. I know how to deal with that, but I am not sure if there is other VBA specifications that I missed. And I want to adapt the language like C#.

I think I will stay with VBA for now because I can't compile .Net code in Excel, which is a big draw back for me. Until Excel has a build-in editor and compiler for C#, I will stick with VBA.

Thanks for the help.