Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting RTF file into TXT file
1. I would like to know how I can convert a file with RTF (Rith Text Format)
extension into a file with TXT extension using VBA code. I tried "FileSystemObject.OpenAsTextFile" method but it did not work very well. 2. Is it possible to convert a file.RTF into file.XLS directly using VBA code? Thanks In Advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting RTF file into TXT file
You cxan use the code below to convert the rtf to text and then open the text
file FName = "c:\temp\abc.rtf" SaveFName = "c:\temp\abc.txt" Set wordobj = GetObject(FName) wordobj.SaveAs Filename:=SaveFName, _ FileFormat:=wdFormatText, _ InsertLineBreaks:=False, _ AllowSubstitutions:=False, _ LineEnding:=wdCRLF "Alogon" wrote: 1. I would like to know how I can convert a file with RTF (Rith Text Format) extension into a file with TXT extension using VBA code. I tried "FileSystemObject.OpenAsTextFile" method but it did not work very well. 2. Is it possible to convert a file.RTF into file.XLS directly using VBA code? Thanks In Advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting a CSV file to an Excel file | New Users to Excel | |||
CONVERTING EXCEL FILE TO DBF FILE IN OFFICE 2007 | Excel Programming | |||
Converting Excel file to text delimited file | Excel Discussion (Misc queries) | |||
Converting excel file to tab delimited (txt) file | Excel Discussion (Misc queries) | |||
converting .PDF file to .xls or .txt file | Excel Discussion (Misc queries) |