Import an Outlook form's information

Davers

Well-known Member
Joined
Sep 17, 2002
Messages
1,165
Hi everyone. I am doing my usual importing of an outlook form to an Excel spreadsheet. This time though, I have about 31 elements I'd like to import. I am currently doing it like this:

Code:
Cells(NextRow, 3) = MItem.UserProperties("039DealerName").Value
Cells(NextRow, 4) = MItem.UserProperties("039P&ACode").Value
Cells(NextRow, 5) = MItem.UserProperties("039PolarityChangeStatus").Value

Is there a way I can get a count of the elements in an outlook form, then loop through them all using some something like:

Code:
For Each Item In MItem
        Cells(NextRow, MItemCount) = MItem.UserProperties(Item).Value
Next

so I don't have to have 31 lines of code to import this stuff?? Let me know if I am being too vague, and I'll post all of my code, or explain in greater detail!

Thanks for any help and have a good day,

Dave (y)
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,203,731
Messages
6,057,041
Members
444,902
Latest member
ExerciseInFutility

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top