Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I convert a file to a rich text file
I have a whole list of word files that need to be converted to rich test
files to download into our EMR system and cannot figure out the best (easiest) way to do it. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I convert a file to a rich text file
The following macro will convert all the doc files in a folder to RTF
Sub SaveAllAsRTF() Dim strFileName As String Dim strDocName As String Dim strPath As String Dim oDoc As Document Dim Response As Long Dim fDialog As FileDialog Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) With fDialog .Title = "Select folder and click OK" .AllowMultiSelect = False .InitialView = msoFileDialogViewList If .Show -1 Then MsgBox "Cancelled By User", , "Save all as RTF" Exit Sub End If strPath = fDialog.SelectedItems.Item(1) If Right(strPath, 1) "\" Then strPath = strPath + "\" End With If Documents.Count 0 Then Documents.Close SaveChanges:=wdPromptToSaveChanges End If strFileName = Dir$(strPath & "*.doc") While Len(strFileName) 0 Set oDoc = Documents.Open(strPath & strFileName) strDocName = ActiveDocument.FullName intPos = InStrRev(strDocName, ".") strDocName = Left(strDocName, intPos - 1) strDocName = strDocName & ".rtf" oDoc.SaveAs FileName:=strDocName, _ FileFormat:=wdFormatRTF oDoc.Close SaveChanges:=wdDoNotSaveChanges strFileName = Dir$() Wend End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Pat wrote: I have a whole list of word files that need to be converted to rich test files to download into our EMR system and cannot figure out the best (easiest) way to do it. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to convert word document in to rich text | Microsoft Word Help | |||
convert a WAV audio file into text? | Microsoft Word Help | |||
convert from file from text to a jpg, .gif, or bmp file? | Microsoft Word Help | |||
How do I convert Rich Text File to Excel or Access File? | Microsoft Word Help |