One of my customers asked us to develop a "VBA macro". However, in the 2010s, it seems weird to me to still use such outdated language, and I’m thinking about trying to convince the customer to use VSTO dev instead. However, as I’m new to both worlds, I need help to fill a pro/cons page to be able to argue this.
Of course, the answer can’t come without the actual requirement, let me try to resume:
Target : Word 2003/2007 (but I’m suspecting 2010 as a not yet known requirement) edit 2010 requirement confirmed
An external publishing system requires .doc file as input. The .doc file must have some specific styles applied : "Custom Header 1", "Custom header 2", etc.
The user can build documents, using Word, using two possible ways:
- Start the new document using a .dot file deployed on the computer
- Transform any existing document to match the target template
Users can "apply" the styles "simply" (simple UI): context menu, styles menu, custom action pane, etc.
By now, I see the following pro/cons:
-
VBA
- Pros:
- ?
- quick and dirty development (quick part of the sentence)
- The customer has already some in production macro
- Cons:
- hard to find skilled developer
- quick and dirty development (dirty part of the sentence)
- Pros:
-
VSTO
- Pros:
- benefits of the .Net language (compiled, typed, rigorous, class library, etc.)
- security model more flexible and powerful (trusting code signed with a trusted authority)
- bridge to WPF panes possible
- You work in Visual Studio and have access to its full set of features: refactoring, source control, etc.
- Cons:
- requires installation of the .Net framework (probably not an issue today) and VSTO runtime
- harder to deploy
- slightly more work at the start (but less in long term)
- Pros:
I’m answering myself to the question, as the project is finished.
I finally decided to write the application using a VBA macro. Here is the post-mortem conclusion of this choice :
Pros:
Cons:
Remark:
As an experienced C# developer, the pros/cons may be partial a bit.