Results 1 to 3 of 3
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    HTML in VBA - faster way?

    I would like to place html in the body of each email



    however I have to go through and make sure for every " that would be used in say style="" in html requires 2 " so that vba works

    Then I have to keep joining & to bring in fields and so on so that it works

    I am hoping there is a quicker way to do this so that I can have fields within my html and make that
    e.g.
    emMessage = "<html><body><table><p style=""color=red;"">Dear " & Person Name & "</p></table></body></html>"

    It gets very confusing writing both VBA and html and there might be a better way?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try apostrophe. Maybe that will be easier to follow.

    style='color=red;'>
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    Try apostrophe. Maybe that will be easier to follow.

    style='color=red;'>
    Thanks

    I also found pasting the html into an editor and then doing a find replace to replace all " with "" also works

    I simplified things a bit and it works better now.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Make my DB go faster
    By athyeh in forum Access
    Replies: 2
    Last Post: 11-05-2013, 08:41 AM
  2. Improving a querry for faster result
    By Aloupha in forum Queries
    Replies: 7
    Last Post: 10-31-2013, 01:07 PM
  3. Report Opens Faster on 2nd try
    By gg80 in forum Access
    Replies: 2
    Last Post: 12-29-2012, 09:18 PM
  4. Faster code? Which one?
    By starson79 in forum Programming
    Replies: 4
    Last Post: 05-13-2011, 06:11 AM
  5. A Faster Search??
    By bladelock9 in forum Forms
    Replies: 0
    Last Post: 03-17-2011, 09:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums