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

N

news.microsoft.com

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
 
K

Ken Slovak - [MVP - Outlook]

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top