Friday, September 23, 2016

Tech Support: Copy from Word document - Paste to Outlook body - Source formatting is not retained...Help Please....

Copy from Word document - Paste to Outlook body - Source formatting is not retained...Help Please....

I have written a subroutine that opens a word document, copies the contents from the document and pastes the same into an outlook body and this forms the body of the outlook message.
The issue here is, copying from the source and pasting to the destination
is perfect but is done in plain text format.

I would like the source formatting in the word document to be retained (with all the colors and fonts !!).
My code goes like this
 
Set olAPP = CreateObject("outlook.application")
Set WrdApp = CreateObject("Word.Application")
WrdApp.Visible = True
Set WrdDoc = WrdApp.Documents.Open("D:\CCVR\Body of the mail.doc")
Set trange = WrdDoc.Range(Start:=WrdDoc.Paragraphs(1).Range.Start, End:=WrdDoc.Paragraphs(WrdDoc.Paragraphs.Count).Range.End)
textmsg = trange
 
With olAPP.CreateItem(0)
    .To = recipient
    .Subject = Cells(i, j) & " - " & monthname() & " - " & "CCVR"
    .Body = textmsg
    .Attachments.Add path
    .Save
End With
Appreciate your help !!
 
Thanks
Matilda Steve

Anwsers to the Problem Copy from Word document - Paste to Outlook body - Source formatting is not retained...Help Please....

Download Error Fixer for Free Now

Save your Word doc as an HTML file, then use this:
 
Set olapp = CreateObject("outlook.application")
Open ("D:\CCVR\Body of the mail.htm" For Input As #1
htmlString = ""
Do While Not EOF(1)
    htmlString = htmlString & Input(1, #1)
Loop
With olapp.CreateItem(0)
    .To = recipient
    .BodyFormat = olFormatHTML
    .Subject = "CCVR"
    .HTMLBody = htmlString
    .Save
End With

To check for Windows updates. Open Windows Update by clicking the Start button , clicking All Programs, and then clicking Windows Update. In the left pane, click Check for updates, and then wait while Windows looks for the latest updates for your computer. If any updates are found, click Install updates.

Install the latest updates for Windows and for the program displaying the error. Note that the update for the program might be listed as an optional update on the Windows Update page.

Open Windows Update by clicking the Start button Picture of the Start button. In the search box, type Update, and then, in the list of results, click Windows Update.

Recommended Method to Repair the Problem: Copy from Word document - Paste to Outlook body - Source formatting is not retained...Help Please....:

How to Fix Copy from Word document - Paste to Outlook body - Source formatting is not retained...Help Please.... with SmartPCFixer?

1. Download Error Fixer. Install it on your computer.

2. After the scan is done, you can see the errors and problems need to be fixed. Click Fix All.

3. The Repair part is finished, the speed of your computer will be much higher than before and the errors have been removed. You can also use other functions in this software. Like dll downloading, junk file cleaning and print spooler error repair.


Related: How Can You Update & Download NVidia 6100, 6800 GS/XT Display Driver v.260.89 WHQL,Where to Download NVidia GeForce 8800 GT WHQL-certified driver v.196.21,How to Update & Download NVidia GeForce Go 7400 Display Driver v.260.19.12,[Solved] Download NVidia GeForce GTX 460M Driver v.331.82,Download NVidia Quadro Plex Model IV VGA Driver v.304.43 Certified,Way to Download RealTek RTL8100C(L) Driver v.5.01,Way to Download RealTek RTL8100E Drivers v.694,Way to Update & Download RealTek RTL8101L Auto Installation Program v.6.110 driver,Method to Update & Download RealTek RTL8111G PXE and RPL ROM code v.2.58 driver,How to Update & Download RealTek RTL8411B(N) Driver v.10.003,Best Way to Update & Download ASUS A53SV nVidia Graphics Driver v.8.17.12.6686,Method to Herunterladen ASUS K75VJ Intel Rapid Storage Technology Treiber v.11.6.0.1030,How Can You Update & Download ASUS CG8580 Intel Chipset Driver v.9.3.0.1019,Method to Update & Download ASUS K41VD Intel INF Update Driver v.9.1.1.1015,Way to Update & Download ASUS Pro70T NB Probe v.3.0.0026 driver
Read More: Counting a range of cells [Solved],Fast Solution to Error: CPU freezes while shutting down,Troubleshoot:Cursor equals Hand-Grabber icon instead of mouse-pointer or text-cursor I-Beam,How to Fix - Count the number invoices which consists any of the given products?,Troubleshoot:Ctrl 'D' command on multiple different cells in one go Error,Closing Internet Explorer causes error,Compare 2 Tables and Calculate the PROFIT Faster,Computer goes to Windows Boot Manager after Start,Connect to one of my network computer remotely when don't allow exception box Marked,computer locking up randomly

No comments:

Post a Comment