VB6 to emulate a contact form

K

Kevin

I'm tired of coding in vbscript, and the lack of controls and events in an
Outlook form. I have a custom contact form that uses only a handful of
contact info fields (name, address, phone numbers, and categories....), but
has a bunch of code to maintain categories, and display sorted listboxes of
attachments.

I'd really like to use VB6 to speed coding, use some nice controls (like
arrays!) and get double click and drag events.

So here's my idea. Have the Outlook contact form have this code:

Function Item_Open()
set shell = CreateObject("WScript.Shell")
shell.Run "MyVB6Form.exe" & Item.EntryID & " " & Item.Parent.storeID
Item.Close 1
End Function

Where "MyVB6Form.exe" is a Visual Basic app that accepts the EntryID, reads
the half dozen contact fields from Outlook, and then displays them. When
the user closes the form, the contact info is written back to Outlook.

I know I'll have to install the app on each client, but I'm installing a COM
module anyway. And more effort is involved up front, but code maintenance
and debugging has to be easier than vbscript, so I think it's a win in the
long run.

Am I missing something obvious that will catch me later? Any comments?

Thanks,
Kevin
 
S

Siegfried Weber

Kevin said:
I'm tired of coding in vbscript, and the lack of controls and events
in an Outlook form. I have a custom contact form that uses only a
handful of contact info fields (name, address, phone numbers, and
categories....), but has a bunch of code to maintain categories, and
display sorted listboxes of attachments.

I'd really like to use VB6 to speed coding, use some nice controls
(like arrays!) and get double click and drag events.

So here's my idea. Have the Outlook contact form have this code:

Function Item_Open()
set shell = CreateObject("WScript.Shell")
shell.Run "MyVB6Form.exe" & Item.EntryID & " " &
Item.Parent.storeID Item.Close 1
End Function

Where "MyVB6Form.exe" is a Visual Basic app that accepts the EntryID,
reads the half dozen contact fields from Outlook, and then displays
them. When the user closes the form, the contact info is written
back to Outlook.

I know I'll have to install the app on each client, but I'm
installing a COM module anyway. And more effort is involved up
front, but code maintenance and debugging has to be easier than
vbscript, so I think it's a win in the long run.

Am I missing something obvious that will catch me later? Any comments?

Have you considered using an ActiveX *.OCX control instead of an *.EXE? An
*.OCX can be hosted inside an Internet Explorer window plus it can be
deployed via a CAB file directly from a Web site. Hosting it inside IE would
mean your Outlook form would just instanciate an IE object that loads
dynamically some HTML (with an embedded <object> tag). That way you can
avaid calling an .EXE file from a hard disk via WSH.

--
Cheers,

Siegfried Weber

If you want a smart answer, ask a smart question
http://catb.org/~esr/faqs/smart-questions.html

Why tables are bad: http://www.hotdesign.com/seybold/,
http://webdesign.about.com/cs/tables/a/aa020800b.htm

Note: Please do not send any e-mail to my old address
(e-mail address removed) because I am no longer connected with this
organization.
 
K

Ken Slovak - [MVP - Outlook]

You can do that. Just make sure you write the code to accept a command line
and parse the command line to get the EntryID and StoreID. Of course those
properties won't exist in an item unless the item has already been saved so
take that into account.
 
S

Sue Mosher [MVP-Outlook]

If it's just a data entry form, that sounds fine. If you're doing validation
or anything else on save, though, don't forget that users can also enter
data directly into a table view. Your form wouldn't come into play then.
 

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