Hi all,
I am looking for a code to do reply all to an open mail from excel vba. And in body of the mail i want to copy paste a range of cell as text and give numbering or bullet points to it. I could able to create a new mail using word editor but was unable to give numbering. Can anyone help me with this. I was using the code given below
Sub sendcomplexEmailrtf()
Dim olApp As Outlook.Application
Dim olEmail As Outlook.MailItem
Dim olInsp As Outlook.Inspector
Dim wddoc As Word.document
Dim strgreeting As String
strgreeting = "dear someone" & vbNewLine
Set olApp = New Outlook.Application
Set olEmail = olApp.CreateItem(olMailItem)
With olEmail
.bodyformat = olformatRichText
.Display
.to = "someone@somewhere.com"
.Subject = "movie Report"
Set olInsp = .getinspector
Set wddoc = olInsp.wordeditor
wddoc.Range.InsertBefore strgreeting
Sheet1.Activate
Range("a1").CurrentRegion.Copy
wddoc.Range(Len(strgreeting), Len(strgreeting)).PasteAndFormat (wdFormatPlainText)
End With
End Sub
I am looking for a code to do reply all to an open mail from excel vba. And in body of the mail i want to copy paste a range of cell as text and give numbering or bullet points to it. I could able to create a new mail using word editor but was unable to give numbering. Can anyone help me with this. I was using the code given below
Sub sendcomplexEmailrtf()
Dim olApp As Outlook.Application
Dim olEmail As Outlook.MailItem
Dim olInsp As Outlook.Inspector
Dim wddoc As Word.document
Dim strgreeting As String
strgreeting = "dear someone" & vbNewLine
Set olApp = New Outlook.Application
Set olEmail = olApp.CreateItem(olMailItem)
With olEmail
.bodyformat = olformatRichText
.Display
.to = "someone@somewhere.com"
.Subject = "movie Report"
Set olInsp = .getinspector
Set wddoc = olInsp.wordeditor
wddoc.Range.InsertBefore strgreeting
Sheet1.Activate
Range("a1").CurrentRegion.Copy
wddoc.Range(Len(strgreeting), Len(strgreeting)).PasteAndFormat (wdFormatPlainText)
End With
End Sub