Outlook 2013 VBA I want to put the entire message to clipboard

Status
Not open for further replies.

RandyDtg

Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Outlook 2013 VBA I want to put the entire message to clipboard including the header ( From Too CC BCC) and all graphics in the Body so it can be pasted into a Word document.

I had it working in Outlook 2010, but no longer works.
 

Forum Admin

Senior Member
You were calling the command buttons?

You can use VBA to get the values directly from the fields.

This can copy to clipboard -

Code:
Sub CapturetoClipbaord() 
Dim oMail As MailItem 
DataObj As MSForms.DataObject 
  Set oMail = ActiveExplorer().Selection.Item(1) 
  Set DataObj = New MSForms.DataObject 
      DataObj.SetText oMail.Body 
      DataObj.PutInClipboard 
End Sub
So, you just need to get the header and merge it into a string with the body. Do you want the full internet header or just the same information that is added to the message body when you hit reply? (You could probably use reply or forward and capture it that way.)

Grabbing the recipients field, the subject and dates isn't a big deal. Formatting them so they look pretty is more difficult.

Full Internet Header code is here - http://www.slipstick.com/developer/code-samples/outlooks-internet-headers/ - write it to a string instead of a message.
 

RandyDtg

Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
What I did in Outlook 2010 & before was, in VBA using calls to ribbon buttons, forward the message, select all and copy to clipboard. Then manually opening an appropriate word document, paste, which kept all formatting and included any images in the message body. I also added in all attachment file names.
I think SetText only does text, no graphics.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
A Outlook 2013 - VBA - Cahnging background colour Outlook VBA and Custom Forms 4
J Outlook 2013 crashes saving VBA & clicking tools | digital signature Outlook VBA and Custom Forms 1
Gary Brown Outlook 2013 VBA to run a rule Outlook VBA and Custom Forms 13
H Problems With Outlook 2013 VBA To Send and Print an email Outlook VBA and Custom Forms 1
J VBA code can't be completely executed in outlook 2013 Using Outlook 0
K Outlook 2013 - Use VBA to change Due date of Tasks Using Outlook 3
B Outlook 2013 erratically deleting original file that is attached Using Outlook 0
X Using Outlook 2013 and Outlook 365 Using Outlook 1
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
J Outlook 2013 Change color of text in data fields of contacts in Outlook 2013? Using Outlook 3
Commodore Outlook (2013) issues with icloud.com mail Using Outlook 0
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
P Outlook 2013 "Item could not be moved - still an issue for Outlook 2013 Using Outlook 0
M Creating an RSS Feed **FROM** Outlook 2013 Calendar. Using Outlook 5
D Outlook 2013 Yahoo IMAP Sync problems Using Outlook 1
iwshim outlook 2013 - I cannot see the "Manage Add-ins" Using Outlook 2
B Outlook 2013/Exchange 2013 - Conf Rooms not fully booking "resolved conflict" meetings Using Outlook 3
G Can't create Folder Groups in Outlook 2013 Using Outlook 0
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
Rupert Dragwater Several questions regarding Outlook 2013 Using Outlook 9
P Outlook 2013 opens with FILE tab selected. Using Outlook 3
I How to display sender's name instead of email address in outlook 2013 message Using Outlook 5
Z Outlook 2013 Gmail IMPA emails not showing dates only showing times Using Outlook 1
B Forward every other email in Outlook 2013 Outlook VBA and Custom Forms 2
P Synching Outlook 2013 Notes with iPhone 8 Using Outlook 1
N Outlook 2013 Folder View Using Outlook 8
M Outlook 2013 fails to start -- missing WindowsCodecs.dll error Using Outlook 3
David Michaels Contact card shows blank Outlook 2013 Outlook VBA and Custom Forms 0
J Calendar data can be viewed on Outlook.com, but no longer syncs to Outlook 2013 Using Outlook.com accounts in Outlook 3
C Attached files on Outlook 2010 Sp1 & Exc 2013 are missing Exchange Server Administration 1
R Folders shifting around in Outlook 2013 and 2016 Using Outlook 3
P Sync Desktop Outlook 2013 with Outlook.com? Using Outlook.com accounts in Outlook 5
J Outlook 2013 when clicking To in a new email show Company names Using Outlook 0
J Outlook - 2013 - Error msg when copying folders from Online Archives to another user's mailbox Using Outlook 0
D Outlook 2013 changing iCloud reminder time? Using Outlook 0
M OUTLOOK 2013 CONTACT PROPERTIES Using Outlook 0
J Object Variable or With Block Not Set Error in Outlook 2016 and not Outlook 2013 Outlook VBA and Custom Forms 3
P Outlook 2013 puts replies in Outbox Using Outlook 1
P Contacts gone missing in Outlook 2013 POP Using Outlook 4
M Outlook 2013 Using Outlook 1
P MS OUTLOOK 2013 - Adding Sender on the CC line Using Outlook 5
P MS OFFICE 2013 - Outlook locking up when using the sent on behalf of feature in VB Using Outlook 3
I Outlook 2010, 2013 will not open .msg or .eml files Using Outlook.com accounts in Outlook 1
Jeff Davis Help fix my Outlook 2013? Using Outlook 28
J Outlook 2013 hanging for unknown reason Using Outlook 1
O Outlook 2013 Problems sending large mails Using Outlook 4
K Rebuilding Outlook 2013 from Outlook.com after OS rebuild Using Outlook.com accounts in Outlook 2
O Windows 10 x64 Outlook 2013 - URL does not open (anymore) Using Outlook 3
J Will BCC messages still deliver if TO address fails Outlook 2013 Using Outlook 3
Liz Schneider PST from Outlook 2013 is now IMAP folders in 2016 Using Outlook 10
Similar threads


















































Top