![]() |
Importing to Excel from an Outlook Form
Hi all.
I'm posting the solution to this problem incase anyone runs into this in the future. My problem was that I needed to import the data from TextBoxes in a form in an email generated by an Outlook template. The solution is as follows: For Each pMail In Fldr.Items If InStr(olMail.Subject, "Subject Title to Search for here") 0 Then Set objItem = pMail.GetInspector.ModifiedFormPages("NAME OF FORM PAGE HERE") ActiveSheet.Cells(i, 1).Value = objItem.TextBox1 ActiveSheet.Cells(i, 2).Value = objItem.TextBox2 ActiveSheet.Cells(i, 3).Value = objItem.TextBox3 i = i + 1 End If Next pMail where objItem is declared as an object and pMail as a Variant. References: Microsoft Outlook 9.0 Oject Library and Microsoft Forms 2.0 Object Library have to be installed. Thanks to Bob Phillips for pointing me in the direction of this solution. Semiaza. |
All times are GMT +1. The time now is 04:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com