Reply
 
Thread Tools Display Modes
  #1   Report Post  
reballdad
 
Posts: n/a
Default 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   Report Post  
Jezebel
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I properly save a file to keep links intact in XP? sdwrench Microsoft Word Help 1 January 5th 05 11:17 PM
Save As is not working due to macro security settings Craig Meritz Microsoft Word Help 1 December 16th 04 04:53 AM
Macro that will add the file path & date to Word footnotes? Rich P Microsoft Word Help 2 December 15th 04 08:49 PM
After I save a Word 2003 file the name changes to ~$ woryn Microsoft Word Help 2 December 13th 04 07:15 PM
How do I save a word file as a .gif or .jpeg file? eileen Walker Microsoft Word Help 1 November 25th 04 01:16 AM


All times are GMT +1. The time now is 11:41 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"