Office 12 XML Formats will support VBA (just not the default formats)
There are two forms of the new formats, one that supports VBA and one that doesn't. I just read this article, and it sounds like there have been some misunderstandings around this fact. If you read through the whitepapers (Microsoft Office Open XML Formats) (Developer View of Office Open XML Formats), you'll see that there are two new forms of the XML file formats. The default formats (.docx, .pptx, .xlsx) will not support VBA. There will also be "macro-enabled" versions of the new formats that will have different extensions (.docm, .pptm, .xlsm) and different content types of the parts within the files.
We created these two new types so that it would be easier to identify and deal with files that have code in them. We are by no means moving away from VBA though, which is why we have the macro-enabled versions of the new formats. VBA is still very important for a ton of our customers, and we will continue to support their solutions going forward using the new file formats. So, if you want to store VBA in your documents, you can either use the current binary formats (.doc, .xls, .ppt), or you can use the macro-enabled version of the new formats (.docm, .xlsm, .pptm). Anyone can change what format is used as the default as well, so if you decide you want to default to the macro-enabled version you can easily do this (it can be centrally controlled via policy as well)
I'll make a future post that goes into the technical details of what's different between the two formats.
-Brian
Comments
- Anonymous
July 13, 2005
Hi Brian
Can I have a default of ".xlsx if there is no code and .xlsm if there is some"? - Anonymous
July 13, 2005
Will there be a way of signing the macros and locking the macros so they can't be tampered with? - Anonymous
July 13, 2005
Stephen - if you try to save a file in the .xlsx format and there are macros you will be prompted if you want to use .xlsm instead, which is pretty much the behavior you are asking for.
W Poust - The locking and signing of macros will be done in the same way that it is today in the binary formats.
-Brian - Anonymous
July 13, 2005
.xls, .xlsx, .xlsm
Aren't you worried about customer confustion by having 3 main formats? - Anonymous
July 13, 2005
Hi Brian,
How will the office 12 XML formats impact the metadata in Office documents. Now, as an IT forensic audutor, we have two ways to proceed: 1)we use dedicated software to visualize metadata items in e.g Word of Excel files.
2) we use an hex editor and the Open Source definitions of the Word of Excel file layout and start looking for the right record type and the right offset within that record.
Will there be special tags for metadata?
LK - Anonymous
July 14, 2005
Ricky, we are definitely concerned about end user confusion from the move to new file formats. We are going to great lengths to make it so that the average end user doesn't need to every think about what format they are in. There will be times when they are faced with making a decision in formats, and we plan to make that as clear and simple a decision as possible. We are going to look closely though usability studies and the Beta programs to see what the impact of this change is on the end user and see how we can make the impact as small as possible.
Luc, the metadata will be easily identifiable and accessible. It will be in its own XML part within the ZIP package that you can quickly find by accessing the root relationship of the package. The schema for the metadata is pretty simple so the XML files shouldn't be too difficult to work with. I think these new formats create a whole new world of document interrogation and make possible some very rich solutions that leverage the contents of the documents.
-Brian - Anonymous
July 18, 2005
The comment has been removed - Anonymous
July 18, 2005
I make extensive use of VBA by writing my own user-defined functions for derivative pricing - these UDFs seem to be little known and in the current debate on file formats tarred with the "macros are bad, poor security brush" - though i'm not sure how true this is for module sheets with only code for functions
These are very popular because nearly all students and people that work in investment banks use Excel - but most don't necessarily want to move up to Visual Studio as a front end - though some might wish to use the automation add-in facility in Excel to call functions written in C# for instance
VSTO is irrelevant for me - i'm much happier writing proper program code that can be called from Excel - i'm not interested in using a more complicated VSTO language and front end to replicate what I can already do in a spreadsheet
One thing that I am trying to do though is write my VBA code in such a fashion that it can easily be translated into C# (via the Instant CSharp program) - Anonymous
October 04, 2005
The comment has been removed - Anonymous
February 22, 2006
In the last post, I showed you how to use the Packaging API to find a particular part and get that part's... - Anonymous
February 28, 2006
Hi Brian
On the other day i tried to open up a simple .xml document in word 12 and tried to create a macro such that i would disable some menu items. The VBA environment that comes with it doesn't give handles to the "The Ribbon" talked so much about!!! How would i run my previous macros (developed for earlier versions) with Office 12 ????
regards
kris