Reputation: 11213
Microsoft have added a new function called saveas2
to Word automation from Version 2010.
I need to write code that checks if this method exists (rather than just calling it and failing).
I can retrieve the version by calling Word.Application.Version
but I can't find a list that maps the value I get from this function (14.0) to word versions. Unfortunately I don't have every version of word installed to make my own list.
I have searched but, have been unable to find it.
Upvotes: 1
Views: 651
Reputation: 1934
I think the following list do the job:
Office 97 - 7.0
Office 98 - 8.0
Office 2000 - 9.0
Office XP - 10.0
Office 2003 - 11.0
Office 2007 - 12.0
Office 2010 - 14.0
Office 2013 - 15.0
You just have to declare them as constants
and you're good to go. Pity that VBA does not allow structures
like in .NET.
Upvotes: 2