![]() |
|
#1
|
|||
|
|||
|
I want to convert the active document from .docx to .rtf and save in the active document path and save with the same active document file name.
Example:- Input: c:\123.docx Output: c:\123.rtf Please help me in this regard’s… I tried the below one but am not getting the same active file name in the same path, could you help me in this regards. Code:
Sub rtf_test()
Dim strFname As String
Dim oDoc As Document
Dim strPath As String
strFname = "Filename"
Set oDoc = ActiveDocument
strPath = ActiveDocument.path & "\"
oDoc.SaveAs2 FileName:=strPath & "Filename.rtf", FileFormat:=wdFormatRTF
End Sub
Thank you so much.
|
| Tags |
| docx, rtf |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| xml to docx | yacov | Word | 2 | 04-20-2020 12:05 AM |
| Merge a .docx into a table in existing .docx | MarkAtTheBeach | Word Tables | 3 | 10-26-2018 12:55 PM |
| Docx??? | word perfect | Word | 1 | 01-18-2013 05:15 AM |
Doc v Docx
|
Frustrated | Word | 3 | 12-12-2011 10:34 PM |
.docx
|
ding dong | Word | 3 | 11-01-2009 12:43 PM |