473,385 Members | 1,400 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,385 software developers and data experts.

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 2397
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.FollowHyperlink "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:\windows\system32\mspaint.exe", 1) ' Run MSPaint.
"MLH" <CR**@NorthState.netwrote in message
news:r7********************************@4ax.com...
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
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...
1
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"...
14
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...
4
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...
3
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...
4
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...
1
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,...
5
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.