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:
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]
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]