473,573 Members | 2,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:\windo ws\system32\dll cache\WordPad.e xe ", 1)
SendKeys "%FOc:\cr\docs\ packets\ntroltt r.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 4373
MLH
On Wed, 17 Sep 2003 00:04:58 +0100, Trevor Best <bouncer@localh ost>
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:\windo ws\system32\dll cache\WordPad.e xe ", 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\ntroltt r.rtf~", False
End Sub


Also you should be able to append the filename to the shell call, e.g.

x = Shell("C:\Progr am Files\Windows NT\Accessories\ wordpad.exe
c:\cr\docs\pac kets\ntrolttr.r tf", 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\pack ets\ntrolttr.rt f) 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\pac kets\ntrolttr.r tf) 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!


xxxxxxxxxxxxxxx xxxxxxxxxx

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
7483
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
11248
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 package. If I open and save the file manualy in Wordpad - it works. (not in Notepad otherwise formatting is changed and DTS package won't accept it.)
3
2837
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
1840
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 application) they will not be opened till the shelled program finishes. I appreciate you help on this issue. Thanks, Mohsen
0
1206
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 my application) they will not be opened till the shelled program finishes. I tested both following methods:
3
5319
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 at it and let me know what I need to change. I have tried changing the "hwnd" type into intptr's but there seem to be other problems too, like it...
6
1539
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 how. Here's the line of code I have so far: varAppID = Shell(strShell, vbNormalFocus) It opens fine. Also, is there a way to open the shelled...
1
5885
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 on a network drive where the back end database resides so that multiple users can write to the same file. I have set up the path to the back end...
0
1365
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") win32gui.SetForegroundWindow(Notepad) editbox = win32gui.FindWindowEx(win32gui.GetDesktopWindow(),None,"Notepad",None)
0
7750
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7674
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7989
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8182
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8039
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5271
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3708
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2170
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1271
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.