SaveAs vs SaveAs2 in the Microsoft Office Word object model

Matthew Simoneau picture Matthew Simoneau · Nov 5, 2010 · Viewed 19.4k times · Source

It looks like SaveAs has gone away in Office 2010 in favor of SaveAs2. What is going on here? Are there any important differences between the two? My fix has been to check for SaveAs2 first, and then fall back to SaveAs. Is this reasonable?

Answer

Hans Passant picture Hans Passant · Nov 5, 2010

It hasn't gone away, you've just got another way to save the document. Save2() takes an extra argument, CompatibilityMode. If you don't care about the compatibility mode then just keep using Save(). If you do then check Application.Version to verify that you can call Save2() without getting an exception.