Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
omyahamburg
Creator II
Creator II

Macro export table to html email

Dear all

I have written a macro to export a pivot chart to an outlook html email.

The pivot chart results in a straight table in html.

I am doing this by html coding, because I want to do some additional formatting and layouting in that email.

There is no possibility for me to use NPrinting.

My question is, is it possible to create that html table also like a pivot in html ?

For your reference I have attached a qvw with the current working macro.

It would be great if somebody has an advice for me.

Thank you in advance.

Joerg

 

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

I think it won't be possible with a simple loop through all cell-values of the table else you will need to check if the current dimension-value is equal to the previous one and then adjusting/removing the value and the border and merging the cells. I assume if you search per google for creating advanced tables in html you will find various examples for it which you could adapt into your logic.

An alternatively might be not to create this pivot-html by yourself else to export the table in a html-file and to read the content from there into your outlook-mail. Here an example of how to export multiple objects into html-files, merging them and using it as content for a mail-body: Exportar-varias-tablas-a-un-archivo-html

- Marcus

View solution in original post

2 Replies
marcus_sommer

I think it won't be possible with a simple loop through all cell-values of the table else you will need to check if the current dimension-value is equal to the previous one and then adjusting/removing the value and the border and merging the cells. I assume if you search per google for creating advanced tables in html you will find various examples for it which you could adapt into your logic.

An alternatively might be not to create this pivot-html by yourself else to export the table in a html-file and to read the content from there into your outlook-mail. Here an example of how to export multiple objects into html-files, merging them and using it as content for a mail-body: Exportar-varias-tablas-a-un-archivo-html

- Marcus

omyahamburg
Creator II
Creator II
Author

Thank you Marcus,  I think I will give it a try to export the table in a html-file.

Have a great day.

Joerg