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

Account Number:
3702179
Required Date:
19/11/14
Vehicle Restrictions:
44 max tonne
Codas Size and delivery restrictions updated:
yes
Preferred Time:
Mon,Tue,Wed,Thu,Fri:06:00-16:00
Grade(If gasoil please confirm use):
Derv GasOil
Qty:
24000 6000
Price Name:

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


<tbody>
</tbody>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,214,608
Messages
6,120,500
Members
448,968
Latest member
screechyboy79

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