/// <summary> /// Copies a document to a specified path. /// </summary> /// <param name="document">The Document instance.</param> /// <param name="path">The path where the new file will be saved.</param> /// <param name="saveFormat">The save format.</param> /// <exception cref="IOException">When the file cannot be saved.</exception> /// <remarks>The document is saved in Unicode little endian encoding.</remarks> /// <returns>True if the operation succedes. False otherwise.</returns> public bool ShadowCopyDocument(Microsoft.Office.Interop.Word.Document document, string path, Microsoft.Office.Interop.Word.WdSaveFormat saveFormat) { DocumentCopier documentCopier = new DocumentCopier(document, path, saveFormat); documentCopier.Perform(); return(documentCopier.GetResults()); }
/// <summary> /// Copies a document to a specified path. /// </summary> /// <param name="document">The Document instance.</param> /// <param name="path">The path where the new file will be saved.</param> /// <param name="saveFormat">The save format.</param> /// <exception cref="IOException">When the file cannot be saved.</exception> /// <remarks>The document is saved in Unicode little endian encoding.</remarks> /// <returns>True if the operation succedes. False otherwise.</returns> public bool ShadowCopyDocument(Microsoft.Office.Interop.Word.Document document, string path, Microsoft.Office.Interop.Word.WdSaveFormat saveFormat) { DocumentCopier documentCopier = new DocumentCopier(document, path, saveFormat); documentCopier.Perform(); return documentCopier.GetResults(); }