By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.