Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SaveAs vs SaveAs2 in the Microsoft Office Word object model

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?

like image 818
Matthew Simoneau Avatar asked Nov 05 '10 15:11

Matthew Simoneau


1 Answers

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.

like image 130
Hans Passant Avatar answered Nov 03 '22 21:11

Hans Passant