Quote:
Originally Posted by macropod
I created the file in Word 2010 and used SaveAs to save it as an RTF file. I didn't then go an examine the contents, as I expected the output to conform to the RTF specifications. I am not confused as to formats vs file extensions. I suppose I should have twigged to something being amiss when it allowed me to save the file with the macro. Attached is another file - this time a true RTF. The macro that's in the other one works fine with this file too.
|
I think I understand why we are not communicating very well. I thought you, as an expert in Word,
knew that doing this operation with Word was the same as doing it from within VB6.
Apparently it isn't
Try this code snippet using cscript and then we will be comparing apples to apples. I have used both Windows 7 (32 bit) , Windows 2008 R2, and XP to demonstrate that the Save dialog always comes up with Word 2010 or Word 1013.
I realize this is not strictly a Word question but it does have to do with the Word object.
Dim WW
Dim FileName
Dim SaveFormat
FileName = "C:\tmp\sample.rtf"
SaveFormat = 0
Set WW = CreateObject("Word.Application")
WW.Visible = True
WW.Documents.Open FileName
call WW.activedocument.SaveAs (FileName, SaveFormat)
WW.activedocument.Close False
where c:\tmp\sample.rtf is internally an rtf file.
The last sample.rtf file you sent me was internally an rtf file.
Thanks again.