Hi,
The following Excel code drafts a simple email in Outlook:
I have a table in Excel (it's a calendar) that I would like to get in the body of the email. Is there a way to automate this with VBA? I think there are no simple MailItem properties that will enable me to get the table into the body of the email.
If I were doing this manually, I'd copy the table, move into the Outlook email, and paste it. Is there a way to automate this process?
I mentioned above that there are no simple MailItem properties to do this. I think I could code the table in HTML. Once it's in HTML, it can be written into the MailItem Body property. Is there an easy way to get the HTML code of the table? Thanks for your help.
Peter
The following Excel code drafts a simple email in Outlook:
Code:
Sub testerrrrrrrrr()
Set myItem = Outlook.CreateItem(olMailItem)
myItem.To = "a.b@c.com"
myItem.Subject = "Test"
myItem.Body = "Two words."
myItem.Display
End Sub
I have a table in Excel (it's a calendar) that I would like to get in the body of the email. Is there a way to automate this with VBA? I think there are no simple MailItem properties that will enable me to get the table into the body of the email.
If I were doing this manually, I'd copy the table, move into the Outlook email, and paste it. Is there a way to automate this process?
I mentioned above that there are no simple MailItem properties to do this. I think I could code the table in HTML. Once it's in HTML, it can be written into the MailItem Body property. Is there an easy way to get the HTML code of the table? Thanks for your help.
Peter