Copy excel data in table format and paste in outlook as table -
i have data in excel sheet, row headers , respective values in columns. want copied in tabular format , pasted in body of outlook email along few texts. unable find tabular code vba. suggest
here snippet:
stremailsubject = "" stremailtext = "" strcc = "" strcontactemail = "" olnewemail .to = strcontactemail '.cc = strcc .body = stremailtext .subject = stremailsubject .display end
the outlook object model provides 3 main ways working item bodies:
- body - string representing clear-text body of outlook item.
- htmlbody - string representing html body of specified item.
- word editor - microsoft word document object model of message being displayed. wordeditor property of inspector class returns instance of document class word object model can use set message body.
you can read more these ways in chapter 17: working item bodies. way choose customize message body. last 2 ways allows create table.
note, may consider using word object model - copying required range in excel , pasting in word document clipboard programmatically.
Comments
Post a Comment