Skip to content

Instantly share code, notes, and snippets.

@jesslilly
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesslilly/e707c3401ef975205ecb to your computer and use it in GitHub Desktop.
Save jesslilly/e707c3401ef975205ecb to your computer and use it in GitHub Desktop.
Word SaveAs
object FileName = tempFilePath;
object FileFormat = msWord.WdSaveFormat.wdFormatFilteredHTML;
object LockComments = false;
object Password = System.Reflection.Missing.Value;
object AddToRecentFiles = false;
object WritePassword = System.Reflection.Missing.Value;
object ReadOnlyRecommended = false;
object EmbedTrueTypeFonts = false;
object SaveNativePictureFormat = System.Reflection.Missing.Value;
object SaveFormsData = false;
object SaveAsAOCELetter = System.Reflection.Missing.Value;
object Encoding = MsoEncoding.msoEncodingUTF8;
// Save as defaults to windows-1252
_document.SaveAs(
ref FileName,
ref FileFormat,
ref LockComments,
ref Password,
ref AddToRecentFiles,
ref WritePassword,
ref ReadOnlyRecommended,
ref EmbedTrueTypeFonts,
ref SaveNativePictureFormat,
ref SaveFormsData,
ref SaveAsAOCELetter,
ref Encoding
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment