A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macro to save rtf file as txt



 
 
Thread Tools Display Modes
  #1  
Old December 20th, 2004, 09:25 PM
reballdad
external usenet poster
 
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  
Old December 20th, 2004, 10:17 PM
Jezebel
external usenet poster
 
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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jet35.sp3 doglover Database Design 3 August 26th, 2004 04:41 PM
Creating Macro for File Save MikeMeeks2001 General Discussion 2 August 24th, 2004 06:12 PM
You do not have exclusive access... ERROR Robin General Discussion 1 July 6th, 2004 01:18 AM
Application must be installed to run Error Keith Setup, Installing & Configuration 1 June 29th, 2004 03:02 AM
Continual Error 1321 Trying to Install Office 2003 Chad Harris General Discussions 9 June 11th, 2004 08:19 AM


All times are GMT +1. The time now is 04:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.