Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / September 2004

Tip: Looking for answers? Try searching our database.

outlook forms returning fields in body of email as text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
The Murray Midget - 24 Sep 2004 10:02 GMT
I have designed a simple graphical form in outlook2000 for the request
of new network accounts for new starters in my organisation.  This
form when fille din and sent is mailed to a generic email account
where it is picked up by my call logging software and logged into a
call for the helpdesk to pick up and complete.

However I need the fields filled in on the form to be emailed as if
text and part of the message body for this process to work.

Any ideas on how to do this?
Sue Mosher [MVP-Outlook] - 24 Sep 2004 12:00 GMT
Put code in the Item_Send event handler to set the Body or HTMLBody property
of the item to whatever layout of information you want. If you're not
familiar with the syntax for reading and setting Outlook property values,
see http://www.outlookcode.com/d/propsyntax.htm

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

>I have designed a simple graphical form in outlook2000 for the request
> of new network accounts for new starters in my organisation.  This
[quoted text clipped - 6 lines]
>
> Any ideas on how to do this?
The Murray Midget - 27 Sep 2004 11:49 GMT
Thanks for your input but I am a complete newbie although I am working
my way through your book (jumpstart for administrators.)

Is there any chance you could break down the code a little more?

Do I have to write some code to set the message body to be filled with
the fields? Then specify for it to be sent in txt, or do I just need
to specify that the message is sent in text only?

> Put code in the Item_Send event handler to set the Body or HTMLBody property
> of the item to whatever layout of information you want. If you're not
[quoted text clipped - 11 lines]
> >
> > Any ideas on how to do this?
Sue Mosher [MVP-Outlook] - 27 Sep 2004 13:31 GMT
Yes, you have to write code. At its simplest, you're looking at code like
this:

Function Item_Send()
   strBody = "Mileage: " & Item.Mileage & vbCrLf & _
     "Custom field: " & Item.UserProperties("Custom Field")
   Item.Body = strBody
End Function

But this isn't really a good solution for OUtlook 2000, because setting Body
in that version converts the message to rich-text format. Section 20.5.1 in
the book has a detailed example that creates an HTML-format message, which
is what you'll probably want to use. (The alternative is to use CDO, another
programming library, but if you're a complete newbie, you'll probably want
to build an all-Outlook solution first.)
Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Thanks for your input but I am a complete newbie although I am working
> my way through your book (jumpstart for administrators.)
[quoted text clipped - 21 lines]
>> >
>> > Any ideas on how to do this?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.