My experience of my first VSTO instead of VBA plugin.
The first plug in I am to design in VSTO (not VBA is what that means) is to have the user mark up a document with bookmarks – a set of bookmarks that leads you along. The bookmarks are to be named in a very specific format. The tool will force the user to use the “select first” type bookmark. You can toggle the viewing of bookmarks as well.
How to Create Add-Ins Using VSTO in MS-Word – this gets one started.It is VS2010 and I am using VS 2013 – but it gives a really good view of adding a ribbon item, using forms and making it all work. Ok – I tried it – this is like trying to kill a mosquito with a elephant gun – but that is what corporate wants. Every time you click “run” it starts a new version of Word. This means that you have to load the document of interest every time. In VBA – you “run” from the context you are already in <- RIGHT THERE IS THE CRUX of my axe griding as well as VBA on the fly debugging on ANYONE”S MACHINE. Alas…
Other links:
Nick
October 8, 2016Thanks for the link. I use Excel extensively at work & dabble in macros to make my work faster. I want to try and develop an Excel Add-In using VSTO. However so far I cannot find a simple tutorial on this… it seems none of the Microsoft learning resources have. If you have any references on I’d surely appreciate it.
Etienne Bley
July 14, 2017Did you get anywhere with this? I have published many other articles since along with those that work with me – so do another search for VSTO and COM. I have to problems Teamviewing with you to set your first VSTO especially if you want to get it VBA compatible. There are SOOOOO MANY PITFALLS. First, I would NOT use VSTO unless you have to. I HAVE to – the IT group says it has to be done in c# and they have NEVER EVER done any Excel programming and will not be looking at any of my work – so I am doing what they want BUT (here is the trick…) I am making all my classes VBA exposed – which means I can use all my VSTO work as an Addin AND as a VBA library. So I am not being held accountable … yet I have to do it their way. The only advantages I have noticed are speed improvements, being able to use .net methods, a lot of hair loss and many more hours chargeable to the project (which is not good for the client and I have mentioned this several times to them – but alas). There is little I can’t do with straight VBA some way.
Etienne Bley
July 14, 2017Oh – and another advantage of VSTO is no one can jigger or reverse engineer the code easily. Again – not great for the client and I too have explained that but for me – that is a good thing.