
Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
Sue, I can definitely see where you're coming from with this. That's why I
originally wrote my question like this:
> I have a custom form with a combo-box control. The Combo-box is populated
> with data from an Access database using DAO. It works fine, but there's one
[quoted text clipped - 16 lines]
>
> Vaughan
But that didn't excite anyone enough to get a response. Having posted about
20 or so questions to this group over six months, I have found that when I
give a full explanation of what I'm trying to do nobody answers. If I then
boil the question down to a couple of lines, I usually get exactly what I
need (more often than not from you Sue. And believe me, I couldn't be more
grateful for all your help.)
In this case, the ploy only worked up to a point. Wolfram has answered my
specific question (thanks Wolfie) but, as you spotted, that doesn't resolve
my overall problem of how to test whether the path to my database is valid
when I run the form. If you (or anyone) can give me a solution to that, I
would be most extremely grateful.
Thanks again for your interest and help
Vaughan
> My point is that if the original poster shows their code and thereby what
> they're trying to accomplish, it should be possible to steer them in the
[quoted text clipped - 11 lines]
> >
> > Wolfram
Wolfram Jahn - 29 Jan 2005 20:02 GMT
Hi,
you could have added one short question to your OP, e.g.
> ... does it work? I'm getting an error (type mismatch)
> and don'ty know if I've used it incorrectly or if it
> simply doesn't work in VBS.
+++
> Any other chance to get file/dir information?
---
Short and clear.
If you ask if dir does/doesn't work then the answer that dir doesn't
exist is exact. I do not want to guess your questions.
Now that you asked, did you consider to use scripting?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/s
gprogrammingfilesystemobject.asp
found there:
Function ReportFileStatus(filespec)
Dim fso, msg
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(filespec)) Then
msg = filespec & " exists."
Else
msg = filespec & " doesn't exist."
End If
ReportFileStatus = msg
End Function
Kind regards
Wolfram
Vaughan - 30 Jan 2005 07:53 GMT
Hi Wolfram
You are absolutely right, I will make sure my osts are more carefully worded
in the future.
And thanks for our suggestions which seems to do exactly what I wanted. I
just have one question. To make it work on my machine I had to add the
Scriting runtime Library to the list of references in Outlook. Will I need to
do this for everyone who uses the form, or can I get the library to be added
by coding it in the form somehow?
Thanks
Vaughan
> Hi,
>
[quoted text clipped - 32 lines]
>
> Wolfram
Wolfram Jahn - 30 Jan 2005 18:25 GMT
> To make it work on my machine I had to add the
> Scriting runtime Library to the list of references in Outlook.
If you use vbscript code in a custom form you need no reference in Outlook.
> Will I need to
> do this for everyone who uses the form, or can I get the library to be added
> by coding it in the form somehow?
I just checked it - I had not even to open the vba editor, just
customized a form, and the code ran.
If you like, I will send an example .oft file by email.
Wolfram
Vaughan - 31 Jan 2005 14:39 GMT
Thanks Wolfman
I tested the form on some other pcs around here and they all worked fine.
The code I already have works fine too, so you don't need to email the .oft
file.
I think this one is resolved now.
Best regards
Vaughan
> > To make it work on my machine I had to add the
> > Scriting runtime Library to the list of references in Outlook.
[quoted text clipped - 11 lines]
>
> Wolfram