Save As HTM with "align=Left" in HTM file code

D

Derek Bliss

Hello Everyone,

Excel 2007

Is it possible when creating an HTM file, through VBA, to set the
"align=left" instead of the default "align=center". I've read some code with
sending to an email where the file is exported to a temp directory, reopened
with a replace command and then copied into an email but this is not possible
because the files are being saved to a website. So I need Excel to put this
option in when it is saving the file.

Thanks
Derek
 
R

Ron de Bruin

I not think that is possible but I good be wrong
Maybe first save it local and make the changes in this file and then upload it to a wesite

I use Replace in my function here
http://www.rondebruin.nl/mail/folder3/mail2.htm

RangetoHTML = Replace(RangetoHTML, "align=center x:publishsource=", _
"align=left x:publishsource=")
 
D

Derek Bliss

Hi Ron,

I've read your posts and tried to incorporate your code in but it does not
seem practical because Excel allows you to set the DivID. I don't see why MS
did not put in an option to change the alignment unless that a feature.

By the way, the excel file is going to used my many people and is stored on
SharePoint server. When they what to publish a part of the a cell range to
their website, it select the range, then save as to HTM.

I would also like to say nice macro you got there and I may need to use
sometime.

Derek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top