Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anybody know of an html template to use in vba??

Status
Not open for further replies.

notageek7

Technical User
Jan 23, 2004
54
0
0
US
I've got a commissions calculation system that has an option that allows users to send out emails. In the system vba code generates html code that is used as emails to be sent out by the system. My new challenge is to allow users to edit the html code, but the approaches I'm trying cause the emails to appear inconsistent. The html isn't editable without messing up the formatting and I don't see an easy fix. Does anybody know of an html template system that already exists? Ideally one that I could use with the vba and pass a sql string to the template system which would then output html.
 
Please help if you have ideas on where to look. I've done some looking around in the FAQ and existing threads but not finding any definate solutions. Not sure if maco's are a possible solution. Thanks in advance, any help is greatly appreciated!!!
 
Sorry, but with Word itself it is not that easy, simply because is an atrocious HTML editor and should really never be used. I say that with all duerespect to Word.

I have worked on numerous HTML improvement macros/templates in Word, but they all are half baked, and ugly.

The are some people working at over at VBAXpress, but while some success is likely the botton line is Word sucks at HTML.

Gerry
 
Thanks fumei for responding. I appologize if my post was not clear, I'm not using word. The tool was built in Access using VBA. The html has been hardcoded in a module using VBA. So the problem is now that a user wants to be able to edit an e-mail when desired, where before it was just a batch e-mail.
 
Oh.

It was hard coded HTML in VBA? Eheu!

No, I think you are out of luck. I think it would be possible in theory, but really....WAY too much work to get a possible job done. Frankly, the whole idea seems narrow sighted. Yes, it may have seemed like a good idea at the time, but personally:

1. We do not allow any HTML, at all, in our emails. It is totally disabled on the network. I think this is a good idea.

2. If the module hard coded the HTML, then if you want editing ability, it is going to have to have excellent parsing ability...which of course will have to be coded.

Good luck.

Gerry
 
Hi, Notageek7

I faced a similar problem sending form letters from a customer service application. I finally gave up trying to play around with the HTML in the program beyond a simple mail-merge sort of filling in the blanks.

Finally decided to have the app create the form letter HTML file on disk and then open Outlook with a macro that creates a new HTML message with the body of the message filled in by reading the file, and the To: and Subject: pre-populated so the user is presented with a "new" message which they can then edit as desired and click on send.

Then they alt-tab back to the customer service app.

Jock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top