creating rtf document from within Word

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

Hi, all,

Is it possible to create an .rtf document from within Word using VBA?
Sometimes I open and work on existing rtf documents in Word, but I'm
wondering if it's possible to create them from within Word as well.

Larry
 
Larry said:
Hi, all,

Is it possible to create an .rtf document from within Word using VBA?
Sometimes I open and work on existing rtf documents in Word, but I'm
wondering if it's possible to create them from within Word as well.

Larry
Yes just save as .rtf

Dim MyDialog As Dialog
Set MyDialog = Dialogs(wdDialogFileSaveAs)

With MyDialog
.Name = strRecDocName & ".rtf"
.Format = wdFormatRTF
.addtomru = 0
End With

HTH

J
 
Well I realized it was a stupid question. It's not a matter of creating
an rtf document out of the blue, but of creating a new unsaved Word
document and then saving that as an rtf document, something like this:

X = InputBox("Enter name of rtf file to be created", "Create RTF File")

Documents.Add
ActiveDocument.SaveAs FileName:=X & ".rtf", FileFormat:=wdFormatRTF

This would take more modifications, but it probably is not worth the
trouble and one could just use the Save As dialog instead.

Larry
 
Thanks.

Larry


Yes just save as .rtf

Dim MyDialog As Dialog
Set MyDialog = Dialogs(wdDialogFileSaveAs)

With MyDialog
.Name = strRecDocName & ".rtf"
.Format = wdFormatRTF
.addtomru = 0
End With

HTH

J
 
Back
Top