On Wed, 17 Sep 2003 00:04:58 +0100, Trevor Best <bouncer@localhost>
wrote:
I can open WordPad directly (Start, Run...), then open
a document & click File, Send... Out goes the email
without a hitch.
However, if I open WordPad from Access this way...
Sub Button1_Click ()
x = Shell("c:\windows\system32\dllcache\WordPad.exe ", 1)
You might want to try "C:\Program Files\Windows
NT\Accessories\wordpad.exe" since the one you're pointing at is a
backup used by windows for system file protection.
SendKeys "%FOc:\cr\docs\packets\ntrolttr.rtf~", False
End Sub
Also you should be able to append the filename to the shell call, e.g.
x = Shell("C:\Program Files\Windows NT\Accessories\wordpad.exe
c:\cr\docs\packets\ntrolttr.rtf", 1)
I tried the syntax with the filename & it puked. So, I used the same
syntax (C:\Program Files\Windows NT\Accessories\wordpad.exe
c:\cr\docs\packets\ntrolttr.rtf) clicking Start, Run... XP returned an
error saying... "Windows cannot find C:\Program"
The following syntax works fine though... Start, Run...
C:\Program Files\Windows NT\Accessories\wordpad.exe
I just don't enjoy the luxury of passing the path 'n filespec to
WordPad. Too bad. Maybe there's a workaround. Thx for the
suggestion!