+ Reply to Thread
Results 1 to 11 of 11

Excel HTML

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Excel HTML

    Hi there,

    I'm trying to format my email generated of excel sheet to have an HTML formal before they are sent out using MS Outlook.
    I have googled, searched your forums and also tried to figure out a solution with the existing helps on the internet. I need help on how to format emails genarated out of my excel sheet. I know a bit of HTML syntax but a newbie to VBA. I'm guessing the formatting has to be done in the Emailbody text function in my code.

    I'm also trying to understand the logic behind the code and also learning excel vba bit by bit at the minute.
    Any chance you can also please advice me the logic for highlighted text in red?

    Please advice

    My code is follows

    Please Login or Register  to view this content.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel HTML

    Check out Ron De Bruin's email code
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel HTML

    Hi Roy

    My Emails are getting generated properly. The problem i'm having is with formatting the emailbody which is of html format. I know there is someline that i need to change in my code which will accept the emailbody as html markups. I'm not sure which one it is and that's why i'm checking

    regards

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel HTML

    I think if you look at the examples there is a Function to convert to HTML

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Excel HTML

    Are spaces not 20 in hex rather than 30?

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel HTML

    please can you advice which example it is?
    I had already gone through the RonDe webpage before posting here.

  7. #7
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel HTML

    Thanks Andy for being very helpful

    Yes the hex is 20. Can u please advice me the logic for those highlighted text in red in my code please

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Excel HTML

    Without the conversion of those characters, and problem a few others, using the mailto method will result in unexpected results or even not being able to send email at all.

    The characters will get interupreted as breaks or delimiters in the command.

  9. #9
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel HTML

    Hi Andy

    Thanks for the reply. Do you suggest then that i need to change my mailto method to any other method described in Ron De webpage?

    Quote Originally Posted by Andy Pope View Post
    Without the conversion of those characters, and problem a few others, using the mailto method will result in unexpected results or even not being able to send email at all.

    The characters will get interupreted as breaks or delimiters in the command.

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Excel HTML

    Your code has a few inconsistencies re: variables, HEX codes, concatenation operator etc so you would need to correct for those in the first instance, however, I confess I'm not quite sure of the overall aim ?

    If you're looking to avoid utilising the OL object model completely (ie no binding at all) then I guess you "could" use the FollowHyperlink method if that's preferable to Shell ?

    Please Login or Register  to view this content.
    Regards the HEX codes etc - see: http://www.pcguide.com/res/tablesASCII-c.html

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Excel HTML

    The mailto approach uses the default mail application.

    The alternative is to write code for a specific mail application, such as Outlook (OL),
    Ron's site has a section on sending parts/whole excel data via OL

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1