Read data from outlook custom form and export it to MS SQL Server DB

  • Thread starter Ilin Start via OfficeKB.com
  • Start date
I

Ilin Start via OfficeKB.com

Please help. I am new to outlook programming. I need to read data from custom
outlook form and export it to MS SQL server DB? Any code examples or
suggestions will be greatly appreciated.
Is it possible to achieve this task using ActiveX script in MS SQL DTS
package? Any other solutions?

Regards,
Ilin
 
J

John Riddle

I'm assuming that you mean reading "custom fields" in an Outlook Item. Data
isn't stored in the form, it's stored in the Outlook (or Exchange) item.

The following code assumes that you have set "myItem" to equal an actual
Outlook Item.


For Each oProp In myItem.ItemProperties
On Error Resume Next
'view the data in a message box (you could put other code to do
whatever else you want with the data)
MsgBox myItem.ItemProperties(oProp)
Next

For Each oProp in myItem.UserProperties
'view the data in a message box (you could put other code to do
whatever else you want with the data)
MsgBox myItem.UserProperties(oProp)
Next

Note: if you're using .NET you'll have to use
"myItem.UserProperties(oProp).Value"

John

Please help. I am new to outlook programming. I need to read data from custom
outlook form and export it to MS SQL server DB? Any code examples or
suggestions will be greatly appreciated.
Is it possible to achieve this task using ActiveX script in MS SQL DTS
package? Any other solutions?

Regards,
Ilin
 

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