E
Ed from AZ
I run a macro which selects sections of a Word document, then opens a
TextStream file object and pastes in the text. The code I'm using is:
Set docNew = fs.CreateTextFile(strNewDoc)
docNew.Write (strNewFile & vbCr & vbCr & _
"This doc created on " & _
Format(Now, "dd mmm yyyy"))
docNew.Close
(fs is FileStreamObject).
I have another macro in Excel that opens a selected doc created this
way using:
WD.Documents.Open doc
(all variables are set good and the code works).
Occasionally, the File Conversion dialog opens. I know these are not
"real" Word docs, but simply text files with a .doc extension, but
saving each of hundreds of files as Word docs adds an enormous amount
of time to the loop.
Is there anything I might be able to do to these files to prevent the
Conversion dialog from opening? Or is there something I can add to
the Excel code to assist these files in opening without the user
having to mess with this?
Ed
TextStream file object and pastes in the text. The code I'm using is:
Set docNew = fs.CreateTextFile(strNewDoc)
docNew.Write (strNewFile & vbCr & vbCr & _
"This doc created on " & _
Format(Now, "dd mmm yyyy"))
docNew.Close
(fs is FileStreamObject).
I have another macro in Excel that opens a selected doc created this
way using:
WD.Documents.Open doc
(all variables are set good and the code works).
Occasionally, the File Conversion dialog opens. I know these are not
"real" Word docs, but simply text files with a .doc extension, but
saving each of hundreds of files as Word docs adds an enormous amount
of time to the loop.
Is there anything I might be able to do to these files to prevent the
Conversion dialog from opening? Or is there something I can add to
the Excel code to assist these files in opening without the user
having to mess with this?
Ed