Save selected text as file to specified location

Help with writing and playing macros

Save selected text as file to specified location

Postby TimP » Fri Sep 15, 2006 3:50 pm

I'm trying to write a macro to reformat a bunch of selected text. It requires that I run an external program (to filter out html markup, actually) so I'm trying to save the selected text to a file then run it through the external processor and replace the selected text with the program's output. I'm getting close but I can't see how to reliably save the text to an external file in a place where I can find it. Is there a way to save a file in a known place? Am I going about this all wrong?

Signed,
Getting a little frustrated.
User avatar
TimP
Newbie
 
Posts: 4
Joined: Thu Sep 14, 2006 11:00 pm

Re: Save selected text as file to specified location

Postby Mofi » Sat Sep 16, 2006 10:26 am

Sure, with the same command as you save a new file: Save As!

IfSel
Copy
NewFile
Paste
SaveAs "Path\Filename.ext"
EndIf

Note: Recording a macro is easier than writting it directly.

Next time use a better thread subject and ask your question in the correct forum. I have corrected the subject and moved your question to the macro forum.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4042
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Macros