Paste formatted text (bold, underlined and in quotes)

Status
Not open for further replies.

Bamerand

Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Dear Outlook / VBA experts,

I am using the following code (googled it) to paste un-formatted text to email message. How can I change it, so the text pasted is bold, underlined and in quotes? Here is an instance for example in the next line. The text - antelope was darker - is pasted, once pasted it is bold, underlined and in quotes. How can this be achieved?

The "antelope was darker", leaner and more thoroughly cooked.

Screenshot.png

Private Sub Paste_Special_Unformatted()
Dim objDoc As Word.Document
Dim objSel As Word.Selection


On Error Resume Next
' get a Word.Selection from the open Outlook item
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
' now do what you want with the Selection

objSel.PasteSpecial Link:=False, DataType:=wdPasteText

Set objDoc = Nothing
Set objSel = Nothing

End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You'll need to format after pasting. Formatting using a macro is easy - although it might be harder if you need to find text within the pasted text. A simple sample macro us here - Use Word Macro to Apply Formatting to Email - there is a second same that shows how to do what you need, more or less, but again, getting the text within the paste is going to be the more difficult part.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Can't paste an image into a task Using Outlook 3
P Add Paste Unformatted to QAT Using Outlook 1
J VBA Outlook : Subject line : Cut and Paste name to heading , number to very end of the body of Email Outlook VBA and Custom Forms 1
O Macro - paste as plain text Outlook VBA and Custom Forms 2
D Paste Excel table into Outlook message Outlook VBA and Custom Forms 6
O How to paste website content using a specific font and removing URLs Using Outlook 2
D Outlook macro with today's date in subject and paste clipboard in body Outlook VBA and Custom Forms 1
K Paste from Windows Clipboard then change font without losing formatting Outlook VBA and Custom Forms 1
N Paste content to Excel when .txt file (attachment) is opened Outlook VBA and Custom Forms 1
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
H Macro to Copy Specific content from Mail Body and Paste to Excel Outlook VBA and Custom Forms 4
Diane Poremsky Paste clipboard contents using VBA New Slipstick.com Articles 0
A Outlook: copy & paste Outlook VBA and Custom Forms 9
V Copy and paste body and subject and send multiple emails Outlook VBA and Custom Forms 3
G outlook 13 copy & paste without losing formatting Using Outlook 1
C Copy Cell value from Excel and paste into current email Outlook VBA and Custom Forms 10
R Copy/paste mailing address Outlook 2013 Using Outlook 6
D Open attached CSV, copy newdata and paste it to database CSV Outlook VBA and Custom Forms 2
O Copy email content and paste into new Word Document using a different font Using Outlook 1
makinmyway Research Pane in Emails Turns on and Cut Paste Keys then Stop Working Using Outlook 5
L Outlook 2007 Delete and Paste Between Fields Using Outlook 25
L "sometimes" cant send mail, we have to copy and paste the message and resend? Using Outlook 2
I Clipboard paste in macro Using Outlook 14
F Cut and Paste Addresses from Excel Suddenly Limited Using Outlook 4
N Cut and Paste Taking 25 seconds Using Outlook 0
R how to copy a list of email contacts and paste them only as names (not names + email address) Using Outlook 12
G Outlook 2007 Macro: Paste - Paste Special - Unformatted Text Outlook VBA and Custom Forms 9
K Copy Entire Email Content - Paste into new Task Outlook VBA and Custom Forms 2
K How to copy Contact Item to Clipboard and Paste as "VCF Link? Outlook VBA and Custom Forms 4
Z unable to paste screenshot into custom form Outlook VBA and Custom Forms 2
S Using copy paste to grab email addresses from the TO: address fiel Using Outlook 14
O VBA to change message format and add formatted signature Outlook VBA and Custom Forms 1
P HTA creating Outlook MeetingItem - need formatted body text Using Outlook 4
D Mail is received in Plain text even formatted and sent in HTML Outlook VBA and Custom Forms 1
P Formatted Text (Using HTML) in Appointment Outlook VBA and Custom Forms 1
M Append text to (formatted) body of Reply Outlook VBA and Custom Forms 2
P Forwarding emails issue with special characters replacing text body Using Outlook 1
J Autoreply email recieved from specific sender after deleting some text from body. Using Outlook 0
O Outlook tasks - Add text column with multiple lines Using Outlook 3
S Body text of Email from invite date/time Outlook VBA and Custom Forms 7
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
B VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
J Outlook 2013 Change color of text in data fields of contacts in Outlook 2013? Using Outlook 10
V Limiting text length in free text field Outlook VBA and Custom Forms 2
Jennifer Murphy Ctrl+Tab sometimes will not move through text a word at a time Using Outlook 1
B Add Prefix text to Subject Line Using Outlook 1
Z Add text to auto-forwarded e-mail Outlook VBA and Custom Forms 4
S Change VBA script to send HTML email instead of text Outlook VBA and Custom Forms 3
M VBA to auto forward message with new subject and body text Outlook VBA and Custom Forms 8
T Missing text in e-mail message after "(Please keep confidential)" Using Outlook 3

Similar threads

Top