A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 30th 06, 02:23 PM posted to microsoft.public.outlook.program_vba
news.microsoft.com
external usenet poster
 
Posts: 65
Default Outlk 2k3 Script: Checking if an application/file exist

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.Number0 then

Is there a better way to do taht ?


tks


  #2  
Old November 30th 06, 03:15 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlk 2k3 Script: Checking if an application/file exist

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

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


"news.microsoft.com" wrote in message
...
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.Number0 then

Is there a better way to do taht ?


tks


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlk 2k3 Script: HtmlMail news.microsoft.com Outlook and VBA 4 November 29th 06 12:52 PM
Outlk 2k3 Script: Saving Excel File programticaly from OUTLOOK SCRIPT news.microsoft.com Outlook and VBA 3 November 22nd 06 04:33 PM
Outlk 2k3 Script: Find and findNext use news.microsoft.com Outlook and VBA 1 November 21st 06 03:44 PM
Outlk 2k3 script: How to get the name of the month news.microsoft.com Outlook and VBA 2 November 21st 06 03:35 PM
Outlk 2k3 Script: Pb Using Find function Help plz!!! news.microsoft.com Outlook and VBA 1 November 15th 06 04:40 PM


All times are GMT +1. The time now is 08:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.