access form internals

K

Kovary Adam

Hi.

In outlook 2000, via COM from delphi6:
I create a reply message based on a custom form.
I catch when the user click the 'send' button.
Before really sending the message I should somehow
to work with mail's form data.
So, how can I access a form's controls, labels,
via a COM component (practically MailItem)?

Thanks in advance,
Koadam
 
K

Kovary Adam

I need this because I hide teh original send button,
the user push my send button in the window.

My big problem is, that if I send a message from outlook
based on a form, receipient using netscape, pegasus, and
other non-ms maiul clients, will got only a winmail.dat
file.

My outlook form looks very simple, like eg.:

Name: ______________
Address: __________
Ticket request: _________
Train no.: __________


underscores are editboxes.
And I want the recipient of the mail receive this as plain text.

Name: Kovacs Bela
Address: Budapest
Ticket request: Sopron, I. class
Train no.: A-12452

That's why I thought I should preprocess the form message
before really sending.

Have you any simplier idea, how to do this?
Thank you in advance,
Koadam
 
S

Sue Mosher [MVP-Outlook]

Put code in the form's Item_Send event handler to create, address and send a
new plain text message with a Body property that includes the information
you want to send. See http://www.outlookcode.com/d/propsyntax.htm if you
need help with getting the data from your custom form's properties or
controls.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
K

Kovary Adam

Thanks for yuor advices.
Now I can iterate through my forms controls.
I have one more question: I have a IControl,
but how can I determine its control type?
(textbox, combobox, etc).

Thanks,
koadam
 
S

Sue Mosher [MVP-Outlook]

I don't recall finding a direct method. You could try to access properties
that are specific to one type of control or another and handle any error
that happens if the control isn't that type.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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