Manipulating Notepad from Excel

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top