Using Excel to Export "body" or "custom Form Fields" in Excel

Oil_magnet

New Member
Joined
Nov 18, 2014
Messages
1
I am using excel to export

Either a table contained in the body of emails

or a custom form i am trying to design in vba for outlook with fields like

[TABLE="width: 557"]
<tbody>[TR]
[TD]Account Number:
[/TD]
[TD]3702179
[/TD]
[/TR]
[TR]
[TD]Required Date:
[/TD]
[TD]19/11/14
[/TD]
[/TR]
[TR]
[TD]Vehicle Restrictions:
[/TD]
[TD] 44 max tonne
[/TD]
[/TR]
[TR]
[TD]Codas Size and delivery restrictions updated:
[/TD]
[TD] yes
[/TD]
[/TR]
[TR]
[TD]Preferred Time:
[/TD]
[TD]Mon,Tue,Wed,Thu,Fri:06:00-16:00
[/TD]
[/TR]
[TR]
[TD]Grade(If gasoil please confirm use):
[/TD]
[TD]Derv GasOil
[/TD]
[/TR]
[TR]
[TD]Qty:
[/TD]
[TD]24000 6000
[/TD]
[/TR]
[TR]
[TD]Price Name:
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]Extra Information:

Code:
Sub Download_Outlook_Mail_To_Excel()
    'Add Tools->References->"Microsoft Outlook nn.n Object Library"
    'nn.n varies as per our Outlook Installation
Dim Folder As Outlook.MAPIFolder
Dim iRow As Integer
    'Mailbox or PST Main Folder Name (As how it is displayed in your Outlook Session)
MailboxName = "MailBox Name"
    'Mailbox Folder or PST Folder Name (As how it is displayed in your Outlook Session)
Pst_Folder_Name = "Folder Name" 'Sample "Inbox" or "Sent Items"
Set Folder = Outlook.Session.Folders(thames_bulk_desk).folders(Bulk_Requests):crash:
If Folder = "" Then
    MsgBox "Invalid Data in Input"
    GoTo end_lbl1:
End If
'Rad Through each Mail and export the details to Excel
Sheets(1).Activate
Folder.Items.Sort "Received"
For iRow = 1 To Folder.Items.Count
    Sheets(1).Cells(iRow, 1).Select
    Sheets(1).Cells(iRow, 1) = Folder.Items.Item(iRow).SenderName
    Sheets(1).Cells(iRow, 2) = Folder.Items.Item(iRow).Subject
    Sheets(1).Cells(iRow, 3) = Folder.Items.Item(iRow).ReceivedTime
    Sheets(1).Cells(iRow, 4) = Folder.Items.Item(iRow).Size
        'Sheets(1).Cells(iRow, 5) = Folder.Items.Item(iRow).SenderEmailAddress
        'Sheets(1).Cells(iRow, 6) = Folder.Items.Item(iRow).Body
        Next iRow
        MsgBox "Outlook Mails Extracted to Excel"
        
end_lbl1:
End Sub

best i have so far as custom form not made yet to be customised

you help would be greatfully appreciated all

Regards

Ben
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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