?
Solved

How To Embed Image in HTML MSAccess Report Output

Posted on 2014-11-24
4
Medium Priority
?
583 Views
Last Modified: 2014-11-25
I have written code in Access 2007 that outputs a report that contains our company logo at the top of the report. When I programatically export the report to a file in HTML format using VBA, the image is not being saved to the file.

How can I ensure that this image is embedded in the file when it is exported?
0
Comment
Question by:JJENSEN3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 25

Expert Comment

by:chaau
ID: 40463426
You cannot embed image to HTML. Its the standard. The HTML page has just an <img> element with the image stored as a separate file. You will have to keep the images separately.
I recommend you use a different export format, such as PDF, or RTF
0
 
LVL 18

Accepted Solution

by:
bonjour-aut earned 2000 total points
ID: 40464343
Hi ,

chaau is correct, that you cannot export an image from the report to the HTML file.
But if it is just to have fixed formating on the HTML, you can use an HTML template for the Export.
In the simplest case it would look like below example: Access will put the report output exactly at the position of '<!--AccessTemplate_Body-->'
Thee are more things, which you can do with the template like adding navigation for multipage report etc.

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=windows-1252">
<TITLE>Reporttemplate</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=24 >
<TD WIDTH=103  ALIGN=LEFT ><img src="EE_test.jpg"></TD><TD WIDTH=590  ALIGN=LEFT  BGCOLOR=#FFFFFF ><FONT style=FONT-SIZE:16pt FACE="Calibri" COLOR=#7f7f7f>Company Name</FONT></TD>
</TR>
</TABLE>
<!--AccessTemplate_Body-->

</BODY>
</HTML>

Open in new window

0
 

Author Comment

by:JJENSEN3
ID: 40464976
I think bonjour-aut is getting me closer to what I want. I am just not sure I am taking the right steps to get there.
What I am actually trying to do is send order acknowledgement emails from a report that is generated in Access 2007. I would like that email to show up with our logo and a link to our website in the body of the email. Similar to what you get when you buy something from Amazon, for example - Their logo appears and they allow you to click in the body of the email to view order status.

Can this actually be done with the method I am utilizing?
0
 
LVL 18

Expert Comment

by:bonjour-aut
ID: 40465196
If we are talking about sending a singular HTML-body per mail, the method to use a report seems rather a detour.  Usually you would generate a mail directly by using one of the following 3 methods:
1. use the locally installed outlook client
2. Use the MS-CDO-component, which works directly to a SMTP server
3. Send data to a web script, which does the job, e.g. a PHP script.
Please ba aware, that many mail clients at the customer side block embeded components like images for security reasons.
To my juddgement, you should plan a mail order confirmation as text or PDF attachmnet.
Nevertheless it is technically possible to use a report as intermediate tool to genereate a static HTML page with logo-image.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question