Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
macro to save rtf file as txt
I am trying to create a macro that will save a .rtf file as a .txt file with
the same name. I can get it to work with one exception. The saved .txt name is always the one that I used when I created the macro. For instance, I create and save a file "test.rtf". I create a macro with the following steps. File, Save as, Save as type changed to .txt, click on Save. I now have a file "test.txt". I then create and save file "test2.rtf". When I run the macro, it saves it as "test.txt" and not "test2.txt". Any help with how to get it to save the .txt file with the same name as the .rtf file would be greatly appreciated. |
#2
|
|||
|
|||
You can't do this sort of thing simply by recording the macro. You'll need
to switch to VBA (Alt-F11) and do it by hand -- get the rtf file name into a variable, change the extension to txt, do your saveas. "reballdad" wrote in message ... I am trying to create a macro that will save a .rtf file as a .txt file with the same name. I can get it to work with one exception. The saved .txt name is always the one that I used when I created the macro. For instance, I create and save a file "test.rtf". I create a macro with the following steps. File, Save as, Save as type changed to .txt, click on Save. I now have a file "test.txt". I then create and save file "test2.rtf". When I run the macro, it saves it as "test.txt" and not "test2.txt". Any help with how to get it to save the .txt file with the same name as the .rtf file would be greatly appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I properly save a file to keep links intact in XP? | Microsoft Word Help | |||
Save As is not working due to macro security settings | Microsoft Word Help | |||
Macro that will add the file path & date to Word footnotes? | Microsoft Word Help | |||
After I save a Word 2003 file the name changes to ~$ | Microsoft Word Help | |||
How do I save a word file as a .gif or .jpeg file? | Microsoft Word Help |