Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / November 2006

Tip: Looking for answers? Try searching our database.

Outlk 2k3 Script: Checking if an application/file exist

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news.microsoft.com - 30 Nov 2006 13:23 GMT
Hi all,

I share a from that run Excel from outlook script, fill sheet with some data
of my contact folder save the excel file and add it as an attachement to a
mail and send it

But....

For some user ( laptop user) they don't have Excel and my form generate an
error

1) How can'I check if Excel is installed to inform the user and propose to
him a link on my app server for installing Excel

2) In other part of my form I load a Word document   how can I check if the
file exist before loading
   for the moment to check the file I use
on error resume Next
.
.
if Err.Number<>0 then

Is there a better way to do taht ?

tks
Ken Slovak - [MVP - Outlook] - 30 Nov 2006 14:15 GMT
You can use CreateObject("Excel.Application") and see if an error is
generated. Or you can look in the registry to find the installation path for
Excel if it's there. I'd post this in an Excel group where they probably
would have more information on what registry keys to look at.

You can look at the error status or you can use one of the many different
methods to check if a file exists in the file system. WSH has the
FileSystemObject.FileExists method, there are Win32 API calls that also will
tell you that (FindFile and relatives).

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi all,
>
[quoted text clipped - 21 lines]
>
> tks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.