An email vba macro

B

Bob

I am hoping to automate the following process.

I have an Outlook folder collecting forms received by e-mail. Every
message in the folder is an instance of the same form, with different
data.

I want to run an excel vba macro to
1. open each form in the folder
2. store the information in each field on the form in the next
empty row of my spreadsheet.
3. move the form to another location, perhaps just delete it.

This process would repeat for each form in the folder until the folder
is empty.

I would open excel and run this macro whenever I wanted an update on
the forms in the folder.

I am NOT asking anyone to write the code for me. But, does anyone
have any ideas on how to use vba to gain access to an e-mail from
within excel? And also, how do I access the data associated with a
particular field within the form?

Thanks in advance for any help received!

Bob.
 
B

Bob

Excellent help in the previous response (thanks Dick!). I was able to
put together a working prototype in only a few minutes.

However, while I can retrieve the ReceivedTime field from the e-mail
(as in the example in the previous response), I haven't been able to
figure out what any of the other standard Outlook fields would be
named. Additionally, I don't know how to retrieve a specific field
from the form we use here at work.

Any insights?
 
B

Bob Grossman

I found the answer to one of my own questions - the names of all the
outlook fields for a mail item are listed in the object inspector.
Sorry for asking a stupid question.

I still don't know how to retrieve the fields from a user created
form. When I attempt to retrieve the Body field of the email, it is
empty. All of the information stored in the form is someplace other
than the Body of the email.

I hope I am being clear and thanks again for any help.

Bob.
 
D

Dick Kusleika

Bob

I've never used forms in Outlook, so I'm not much help. I just tried to
create a form and send it to myself, but it worked the same as a regular
email message, so there's something I'm not getting about what you're doing.

If you can give me some simple steps to create a form and send it like what
you're doing (only not as complicated), I will see what I can find out.
 
B

Bob Grossman

I have been able to access the data on a user defined form using the
syntax:

Item.UserProperties.Item("EmployeeToInterview").value

Just substitute the field name in the quotes.

Thanks for all the help!
 

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