S
SurfBoy
the following code will SaveAs to a file, but the document is always empty.
Even saving as different file types. I have tried every possible event, like
ThisDocument_CloseEvent
ThisDocument_New
ThisDocument_BeforeClose
ThisDocument_AvtivateEvent...
ThisApplication.ActiveDocument.SaveAs() AND just SaveAS()
.any ideas?
object FileName = @"C:\mydoc.doc";
object FileFormat = Word.WdSaveFormat.wdFormatDocument;
object LockComments = false;
object AddToRecentFiles = true;
object ReadOnlyRecommended = true;
object EmbedTrueTypeFonts = true;
object SaveNativePictureFormat = true;
object SaveFormsData = true;
object SaveAsAOCELetter = false;
object Encoding = 20127;
object InsertLineBreaks = false;
object AllowSubstitutions = false;
object LineEnding = Word.WdLineEndingType.wdCRLF;
object AddBiDiMarks = false;
ThisApplication.ActiveDocument.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);
Even saving as different file types. I have tried every possible event, like
ThisDocument_CloseEvent
ThisDocument_New
ThisDocument_BeforeClose
ThisDocument_AvtivateEvent...
ThisApplication.ActiveDocument.SaveAs() AND just SaveAS()
.any ideas?
object FileName = @"C:\mydoc.doc";
object FileFormat = Word.WdSaveFormat.wdFormatDocument;
object LockComments = false;
object AddToRecentFiles = true;
object ReadOnlyRecommended = true;
object EmbedTrueTypeFonts = true;
object SaveNativePictureFormat = true;
object SaveFormsData = true;
object SaveAsAOCELetter = false;
object Encoding = 20127;
object InsertLineBreaks = false;
object AllowSubstitutions = false;
object LineEnding = Word.WdLineEndingType.wdCRLF;
object AddBiDiMarks = false;
ThisApplication.ActiveDocument.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);