Thanks i did find this
Shell "notepad.exe", vbNormalFocus
Application.SendKeys ("^V")
which works for opening and pasting
but i can't find anything for SaveAs
i am selecting data from different sheets in excel then using notepad to
paste this data into. the notepad is then saved as a script file. Hence the
need to control notepad
> You can open notepad with the following statements and then change the focus
> to the NotePad window with these commands
[quoted text clipped - 15 lines]
> >
> > thanks in advance
Joel - 10 Oct 2008 13:49 GMT
My code is equivalent to yours but is more robust by specifying the ID
(incase multiple NotePad applications are open) and wil work if a different
folder is the default folder.
Root = Environ("SystemRoot")
ID = Shell(Root & "\Notepad.exe", vbNormalFocus)
SendKeys "^v", Wait:=True
SendKeys "^s", Wait:=True
SendKeys "%n", Wait:=True
SendKeys "c:\temp\abc.txt{Enter}", Wait:=True
> Thanks i did find this
>
[quoted text clipped - 27 lines]
> > >
> > > thanks in advance