473,799 Members | 3,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Seeking VBA equivalent of launching MSPAINT c:\image.bmp with XP's START button

MLH
What's the best way to launch MSPAINT c:\image.bmp
from a VBA procedure. Seeking the route with the least
number of complications. Hopefully there will be no more
complications than if I clicked START and typed in the
command myself.
Feb 18 '08 #1
3 2428
On Sun, 17 Feb 2008 18:56:44 -0500, MLH wrote:
What's the best way to launch MSPAINT c:\image.bmp
from a VBA procedure. Seeking the route with the least
number of complications. Hopefully there will be no more
complications than if I clicked START and typed in the
command myself.
Are your .bmp file types set up to open in Paint?
Simplest for me is:

Application.Fol lowHyperlink "c:\Foldername\ ImageName.bmp"

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 18 '08 #2

' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
RetVal = Shell("c:\windo ws\system32\msp aint.exe", 1) ' Run MSPaint.
"MLH" <CR**@NorthStat e.netwrote in message
news:r7******** *************** *********@4ax.c om...
What's the best way to launch MSPAINT c:\image.bmp
from a VBA procedure. Seeking the route with the least
number of complications. Hopefully there will be no more
complications than if I clicked START and typed in the
command myself.

Feb 18 '08 #3
MLH
Putting it in click event did the trick nicely.
Thx.
Feb 20 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2859
by: Patrick L. Nolan | last post by:
I'm trying to find a clean way to launch a Wordpad editor on Windows. By "clean", I mean that it should work on as many versions of Windows as possible, and it shouldn't require installing any extra software. I assume everyone has win32api and its friends. The problem is to find the path to wordpad.exe. At first I just copied the path from my XP machine: c:\Program Files\Windows NT\Accessories\WORDPAD.EXE
1
1380
by: Michael H | last post by:
I have a strange error occuring in my winforms app that I can't seem to find any fix for. With a button click I am launching something like the following: string url ="http://www.microsoft.com" System.Diagnostics.Process.Start(url); Now, it USED to work in my current winforms app. However, now it throws an error everytime when I try to launch this. It throws: "An unhandled exception of type 'System.ComponentModel.Win32Exception'...
14
11099
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
4
8384
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to display the contents of a TIFF image file. According to the very limited documentation that I have been able to locate so far, all I should need to do is to drop the Image Edit Control onto the form in design mode, set the control's Image property to...
3
6166
by: Tam | last post by:
Having problems with this code. ProcessStartInfo info = new ProcessStartInfo(); info.FileName = ("mspaint.exe"); info.Arguments = image.getFileName; // returns full path and name info.ShellExecute = false; Process p1 = ProcessStart(info); Problem arises on complicated pathnames. If the string returned in info.Arguments is in say c:\pics\pic1.bmp then it loads fine. Only when
4
3282
by: m11533 | last post by:
I am writing a fairly complex application in c# and Visual Studio .Net 2003. Right now I am working on a simple console application (to be launched in the future from a service) that receives messages sent via IP from an external device. I am also writing a simulator of that external device. My question: How do I setup the Visual Studio so that when I start debugging my c# application, both my message sink AND simulator are launched? I...
1
2589
by: André Nogueira | last post by:
Hi there. I'd like to allow the user to create some free-form drawing in my application, in the style of Microsoft Paint (the Brush tool) or Paint.Net. I've looked through Paint.Net's source code, but could not quite understand it... :$ So.. what should I do? are there any tutorials? I've got some code working, but this codes creates a non continuous line and is kind of slow.. My code is
5
11014
by: =?Utf-8?B?VG9tYXM=?= | last post by:
Hello, Somebody knows which is the equivalent one in C++/CLI ? HINSTANCE ShellExecute(HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd
8
19513
by: cobolguy | last post by:
I can execute mspaint using VBA but I have not been successful trying to open a .jpg image file. This command works to execute mspaint but I do not know how to excute and bring up a file at the same time. I am using Access 2007. Dim retVal retVal = Shell("c:\windows\system32\mspaint.exe", vbMaximizedFocus)
0
9688
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
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
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.