I know I can export data to a text file.
Is it also possible to open up notepad and paste a chunk of text into it?
Jesper
Not reliably. Notepad doesn't support automation. While you might be able to
cobble together code that automates keystrokes, if the user clicks anywhere
while the code is running, it won't work properly.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I know I can export data to a text file.
> Is it also possible to open up notepad and paste a chunk of text into it?
>
> Jesper
Jesper - 09 Aug 2005 18:54 GMT
> Not reliably. Notepad doesn't support automation. While you might be able
> to cobble together code that automates keystrokes, if the user clicks
> anywhere while the code is running, it won't work properly.
Thanks both of you.
You can export to a text file and then use something like
lngRetVal = Shell("notepad.exe """ & strFileSpec & """")
to open it in Notepad.
>I know I can export data to a text file.
>Is it also possible to open up notepad and paste a chunk of text into it?
>
>Jesper
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.