473,395 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 4357
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: J Bunton | last post by:
ShellStr = "C:\temp\wzzip " & ZipOptions & " " & ZipTo & " " & ZipFrom ShellRet=Shell(ShellStr) .. . . . . . msgbox "Done" How can I determin whether the Shelled process is still running.
3
by: Maya | last post by:
Hey, there! I'm new to vb.net and it seems I wouldn't be able to solve this without help. I have a pipe delimited file that has to be saved in txt format so it could be accepted by my DTS...
3
by: MLH | last post by:
Where would I go to find a list of the possible return values for X and their implication when launching.. X=Shell("C:\Windows\wordpad.exe c:\cr\docs\packets\ntrolttr.rtf", 1) ???
4
by: Mohsen Aghazadeh | last post by:
In my application I wait for a shelled application to finish and continue to work. Everything works fine but when the shelled program is up and user tries to open other applications (outside of my...
0
by: | last post by:
In my application I wait for a shelled application to finish and continue to work. Everything works fine but when the shelled program is up and user tries to open other applications (outside of...
3
by: Rob | last post by:
Hi all, I am having trouble converting the code below (found on http://vbnet.mvps.org/index.html?code/core/sendmessage.htm) into a format that will work using vb .NET. Can anyone have a look...
6
by: rdemyan via AccessMonster.com | last post by:
Is there a way, in code, to move a shelled application on the screen. I've got the shelled app to open and it centers itself. I would like to move it to the right using code, but I don't know...
1
by: stuart.medlin | last post by:
I have an Access 2003 application that I recently converted from Access 97. I have a routine in which I use to export the data that the users have keyed into a text file. This text file resides...
0
by: MegaOctet | last post by:
Hello, I'm trying to send some text in wordpad and here is my script: import win32gui import win32api import win32con import time Notepad= win32gui.FindWindow(None,"Sans titre - Bloc-notes")...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.