Hi everyone,
I have a problem here. Here is my code:
The document is saved in the temp folder the Document is always Empty. I've done the same thing with Excel and the xls is saved correctly. I cant see what is causing this here.
Help will be really apreciated,
JMA
I have a problem here. Here is my code:
Code:
private void wa_DocumentBeforeSave(Word.Document Doc, ref bool SaveAsUI, ref bool Cancel) { Cancel = true; SaveAsUI = false; SaveDocumentAtSharePoint(Doc); } private void SaveDocumentAtSharePoint(Word.Document Doc) { object FileName = @"C:\temp\WordFile.doc"; object FileFormat = Word.WdSaveFormat.wdFormatDocument; object LockComments = false; object AddToRecentFiles = false; object ReadOnlyRecommended = false; object EmbedTrueTypeFonts = false; object SaveNativePictureFormat = true; object SaveFormsData = true; object SaveAsAOCELetter = false; object Encoding = Core.MsoEncoding.msoEncodingUSASCII; object InsertLineBreaks = false; object AllowSubstitutions = false; object LineEnding = Word.WdLineEndingType.wdCRLF; object AddBiDiMarks = false; Doc.SaveAs(ref FileName, ref FileFormat, ref LockComments, ref missing, ref AddToRecentFiles, ref missing, ref ReadOnlyRecommended, ref EmbedTrueTypeFonts, ref SaveNativePictureFormat, ref SaveFormsData, ref SaveAsAOCELetter, ref Encoding, ref InsertLineBreaks, ref AllowSubstitutions, ref LineEnding, ref AddBiDiMarks); Doc.Saved = true; }
Help will be really apreciated,
JMA
Comment