Results 1 to 4 of 4
  1. #1
    chris.williams is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    94

    Report Sent as HTML Body - multiple pages

    Hi All:



    I have a report that is send to an HTML file and then the HTML file is specified as the HTMLbody of an outbound message.

    The problem I am having is that if the report spans multiple pages, the first page is set as the HTML body, but any subsequent pages are not. As I look into the actual HTML file that is created by the report, there is one file for each page.

    How do I tell a report to save to a one-page HTML file rather than splitting it up into multiple pages?

    Code:
    DoCmd.OutputTo acOutputReport, varReportName, acFormatHTML, varApprovalRequest
    
    Set objOutlook = CreateObject("Outlook.application")
    
    Set objEmail = objOutlook.CreateItemFromTemplate(varEmailTemplate)
    With objEmail
    .To = varSendTo
    .cc = varSendCC
    .Subject = varSubjectText
    .HTMLBody = varHTMLBody
    .Attachments.Add varApprovalRequest
    .Display
    .SentOnBehalfOfName = varSendFrom
    End With

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Don't know if you can.

    Why send as body of email?

    Could output to PDF and attach the PDF.
    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
    chris.williams is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    94
    Thanks June7 - I temporarily resolved the issue by changing the size of the page to 14" rather than 11". But I will encounter the same problem if there is more text in the fields. Probably a custom page size is what is needed - just haven't done that yet.

    As to why, it's all about presentation. The fewer clicks a user has to issue, the better refined the product it is. There are appropriate places for attachments, this one going to executives is not one of them. They won't take the time to open an attachment and a fixed width/courier fonts look just out of place for a communication which requires formatting. Additionally, with an HTML body, I can insert command buttons that take the user to web sites that are next in line for the workflow - While something similar can be done with PDF, it's arguably not as elegant.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Okay. I think if the report is going to have variable length you will have problems. Good luck and sorry I have nothing else to offer.
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 06-26-2012, 09:37 AM
  2. Replies: 2
    Last Post: 02-08-2012, 01:03 PM
  3. HTML body in Access 2007
    By amangupts in forum Forms
    Replies: 4
    Last Post: 12-19-2011, 05:52 AM
  4. Replies: 0
    Last Post: 05-23-2010, 10:39 PM
  5. Blank pages between report pages
    By jonsuns7 in forum Reports
    Replies: 2
    Last Post: 10-01-2009, 05:06 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