Manipulating Notepad from Excel

G

Guest

Can someone assist with VBA code within excel to kick off notepad, do a paste
(because I've already issued a copy) and then save the file as message.txt
and close to return to excel.

Thanks in advance.
 
M

mosleyn

Can someone assist with VBA code within excel to kick off notepad, do a paste
(because I've already issued a copy) and then save the file as message.txt
and close to return to excel.

Thanks in advance.

Why not save as text from excel? You can use the SaveAs method or
SaveCopyAs.

Example:

ActiveWorkbook.SaveAs fileFormat:=xlTextWindows

Take care though, because it will only save the active sheet. So
paste what you want to save as text to a new sheet (or a new workbook
if you have other data that you don't want to lose) and then save as
text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top