Hi
From Access, I am opening a Word file, finding and replacing words, copying the contents of it (Select All) and pasting it in New Message in Outlook, however, I want the format to be pasted as well.

I posted this msg earlier but it seems its died down, so I have to post it again. Here is the code

[vba]
Dim wordApp As Word.Application
Dim wordDoc As Word.Document
Set wordApp = CreateObject("Word.Application")
With wordApp
.Visible = False
Set wordDoc = .Documents.Open("filename")
End With

Dim wordSelection As Selection
Set wordSelection = wordApp.Selection

With wordSelection.Find
.Text = "SOMETHING"
.Forward = True
.MatchWholeWord = True
.Replacement.Text = Trim(txtSomething.Value)
.Execute Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue
End With

' I go on replacing more texts

wordDoc.Select

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

Set objOutlook = CreateObject("Outlook.Application")

Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.Subject = "Subject"
.BodyFormat = olFormatRichText
.Body = wordSelection.Text
.Display
End With

Set objOutlook = Nothing

'closes the word document, does not save changes and does not prompt to save changes
wordDoc.Close (False)
wordApp.Quit ' close the Word application
Set wordDoc = Nothing
Set wordApp = Nothing

[/vba]

In objOutlookMsg.Body using both wordSelection.Text or just wordSelection pastes the contents but not the format.

I tried using objOutlookMsg.Body = wordSelection.PasteFormat, after using wordSelection.copy above but the PasteFormat gives an error.

I would really appreciate some help.