469,317 Members | 1,940 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Using Send in WordPad, shelled to from Access...

MLH
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)
SendKeys "%FOc:\cr\docs\packets\ntrolttr.rtf~", False
End Sub

.... I get an error if I click File, Send...

I've tried removing the Q330994 security patch for Outlook
Express, but that did not result in any noticeable difference.

Ideas anyone?
Nov 12 '05 #1
3 4147
MLH
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!
Nov 12 '05 #2
MLH
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!


xxxxxxxxxxxxxxxxxxxxxxxxx

I think I'll just put a copy of WordPad in C:\Windows and get rid
of the whole spaces in DIRnames & FILEnames issue. That ought
to do it.
Nov 12 '05 #3
MLH
I think I'll just put a copy of WordPad in C:\Windows and get rid
of the whole spaces in DIRnames & FILEnames issue. That ought
to do it.


That did it.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mohsen Aghazadeh | last post: by
3 posts views Thread by Rob | last post: by
6 posts views Thread by rdemyan via AccessMonster.com | last post: by
reply views Thread by MegaOctet | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.