<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bworsley</id>
	<title>DataFlex Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bworsley"/>
	<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Special:Contributions/Bworsley"/>
	<updated>2026-04-30T15:16:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP&amp;diff=2388</id>
		<title>SMTP</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP&amp;diff=2388"/>
		<updated>2010-03-06T13:45:21Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: /* In Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;SMTP&#039;&#039;&#039; or &#039;&#039;&#039;Simple Mail Transfer Protocol&#039;&#039;&#039; is a method of sending emails, and is commonly used as an alternative to sending emails via MAPI.  SMTP is not natively supported in [[Dataflex]] but can easily be achieved through an [[ActiveX]] control.&lt;br /&gt;
&lt;br /&gt;
==Creating a COM Interface for SMTP Email==&lt;br /&gt;
&lt;br /&gt;
===Why SMTP?===&lt;br /&gt;
&lt;br /&gt;
[[MAPI]] email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the [[email]] is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using [[SMTP]] seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
===How SMTP?===&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at [http://www.aspemail.com www.aspemail.com] was selected.  The aspemail [[DLL]] is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an [[ASP]] page.&lt;br /&gt;
&lt;br /&gt;
===DLL Package Creation===&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
===The View===&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following &amp;quot;form&amp;quot; controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
  The SMTP host address - oHost&lt;br /&gt;
  From address - oFromAddr&lt;br /&gt;
  To address - oToAddr&lt;br /&gt;
  Subject - oSubject&lt;br /&gt;
  Message (body) - oMessage&lt;br /&gt;
  Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add &#039;&#039;Use aspemail.pkg&#039;&#039; to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to &#039;&#039;Send&#039;&#039;&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object.&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.  Add the create statement just below the object declaration.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
  Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an [[ActiveX]] component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
===Sending the email===&lt;br /&gt;
&lt;br /&gt;
Inside the [[OnClick]] event in the &#039;&#039;Send&#039;&#039; button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
  String sAttach sName&lt;br /&gt;
  Integer iRC&lt;br /&gt;
  Boolean bIsComObjectCreated&lt;br /&gt;
  &lt;br /&gt;
  Get IsComObjectCreated of oComMailSender to bIsComObjectCreated&lt;br /&gt;
  &lt;br /&gt;
  If (not(bIsComObjectCreated)) Begin&lt;br /&gt;
      Send CreateComObject to oComMailSender&lt;br /&gt;
  End&lt;br /&gt;
  &lt;br /&gt;
  Send ComReset to oComMailSender&lt;br /&gt;
  &lt;br /&gt;
  Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
  Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
  Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
  Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
  Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
  Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
  Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
  Get Value of oAttachment to sAttach&lt;br /&gt;
  If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
      Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
  End&lt;br /&gt;
            &lt;br /&gt;
  Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
  If (not(iRC)) send stop_Box &amp;quot;Email failed.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  // Alternative login - if using the free non-pro version&lt;br /&gt;
  // the ComUserName and ComPassword properties will not work&lt;br /&gt;
  // use this instead:&lt;br /&gt;
  Send ComLogonUser of oComMailSender &amp;quot;&amp;quot; &amp;quot;YourEmailLoginID&amp;quot; &amp;quot;YourEmailLoginPassword&amp;quot; 0&lt;br /&gt;
&lt;br /&gt;
===SMTP Host===&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
===Operation===&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click &#039;&#039;Send&#039;&#039;.  You will need valid email addresses for the &#039;&#039;from&#039;&#039; and &#039;&#039;to&#039;&#039; and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the &#039;&#039;sName&#039;&#039; variable.  A name is not required for the &#039;&#039;To&#039;&#039; address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the addressee&#039;s &#039;&#039;name&#039;&#039; could be added to the form.&lt;br /&gt;
&lt;br /&gt;
===In Conclusion===&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the &#039;&#039;com&#039;&#039; from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;br /&gt;
&lt;br /&gt;
One consideration is that aspemail, while an excellent product, will not work with SSL so email providers like gmail can&#039;t easily be used for the SMTP server.  If SSL isn&#039;t a consideration, then this would be an excellent choice.&lt;br /&gt;
&lt;br /&gt;
[[Category: ActiveX]]&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP&amp;diff=2387</id>
		<title>SMTP</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP&amp;diff=2387"/>
		<updated>2010-03-06T13:41:16Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: /* Sending the email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;SMTP&#039;&#039;&#039; or &#039;&#039;&#039;Simple Mail Transfer Protocol&#039;&#039;&#039; is a method of sending emails, and is commonly used as an alternative to sending emails via MAPI.  SMTP is not natively supported in [[Dataflex]] but can easily be achieved through an [[ActiveX]] control.&lt;br /&gt;
&lt;br /&gt;
==Creating a COM Interface for SMTP Email==&lt;br /&gt;
&lt;br /&gt;
===Why SMTP?===&lt;br /&gt;
&lt;br /&gt;
[[MAPI]] email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the [[email]] is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using [[SMTP]] seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
===How SMTP?===&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at [http://www.aspemail.com www.aspemail.com] was selected.  The aspemail [[DLL]] is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an [[ASP]] page.&lt;br /&gt;
&lt;br /&gt;
===DLL Package Creation===&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
===The View===&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following &amp;quot;form&amp;quot; controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
  The SMTP host address - oHost&lt;br /&gt;
  From address - oFromAddr&lt;br /&gt;
  To address - oToAddr&lt;br /&gt;
  Subject - oSubject&lt;br /&gt;
  Message (body) - oMessage&lt;br /&gt;
  Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add &#039;&#039;Use aspemail.pkg&#039;&#039; to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to &#039;&#039;Send&#039;&#039;&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object.&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.  Add the create statement just below the object declaration.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
  Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an [[ActiveX]] component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
===Sending the email===&lt;br /&gt;
&lt;br /&gt;
Inside the [[OnClick]] event in the &#039;&#039;Send&#039;&#039; button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
  String sAttach sName&lt;br /&gt;
  Integer iRC&lt;br /&gt;
  Boolean bIsComObjectCreated&lt;br /&gt;
  &lt;br /&gt;
  Get IsComObjectCreated of oComMailSender to bIsComObjectCreated&lt;br /&gt;
  &lt;br /&gt;
  If (not(bIsComObjectCreated)) Begin&lt;br /&gt;
      Send CreateComObject to oComMailSender&lt;br /&gt;
  End&lt;br /&gt;
  &lt;br /&gt;
  Send ComReset to oComMailSender&lt;br /&gt;
  &lt;br /&gt;
  Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
  Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
  Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
  Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
  Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
  Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
  Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
  Get Value of oAttachment to sAttach&lt;br /&gt;
  If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
      Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
  End&lt;br /&gt;
            &lt;br /&gt;
  Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
  If (not(iRC)) send stop_Box &amp;quot;Email failed.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  // Alternative login - if using the free non-pro version&lt;br /&gt;
  // the ComUserName and ComPassword properties will not work&lt;br /&gt;
  // use this instead:&lt;br /&gt;
  Send ComLogonUser of oComMailSender &amp;quot;&amp;quot; &amp;quot;YourEmailLoginID&amp;quot; &amp;quot;YourEmailLoginPassword&amp;quot; 0&lt;br /&gt;
&lt;br /&gt;
===SMTP Host===&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
===Operation===&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click &#039;&#039;Send&#039;&#039;.  You will need valid email addresses for the &#039;&#039;from&#039;&#039; and &#039;&#039;to&#039;&#039; and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the &#039;&#039;sName&#039;&#039; variable.  A name is not required for the &#039;&#039;To&#039;&#039; address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the addressee&#039;s &#039;&#039;name&#039;&#039; could be added to the form.&lt;br /&gt;
&lt;br /&gt;
===In Conclusion===&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the &#039;&#039;com&#039;&#039; from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;br /&gt;
&lt;br /&gt;
[[Category: ActiveX]]&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2358</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2358"/>
		<updated>2009-02-22T14:34:03Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Scroll down to the bottom and look at the screen shot.&lt;br /&gt;
&lt;br /&gt;
Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, it gets a little more complicated as you will need a table to hold it all.  In the cell, just before the second page, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;table&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
         &amp;lt;pagebreak here - this one might not be necessary, depending on what&#039;s above...&amp;gt;  &lt;br /&gt;
         &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
       &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
         &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
         &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
         &amp;lt;/span&amp;gt;&lt;br /&gt;
       &amp;lt;td&amp;gt;&lt;br /&gt;
     &amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Showing the data&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The invoice data is shown in regular input fields, but the borders are suppressed. Put the following in your &amp;quot;head&amp;quot; section.  &lt;br /&gt;
The bk tag makes adding a pagebreak easy.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;style&amp;gt;&lt;br /&gt;
        input {font-weight: bold; type=&amp;quot;text&amp;quot;; border: 0; font-size: 10px; readonly=&amp;quot;readonly&amp;quot;; }&lt;br /&gt;
        bk {page-break-after: always;}&lt;br /&gt;
    &amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:WaybillSample.JPG]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2357</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2357"/>
		<updated>2009-02-22T14:31:54Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Scroll down to the bottom and look at the screen shot.&lt;br /&gt;
&lt;br /&gt;
Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;table&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
         &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
         &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
       &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
         &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
         &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
         &amp;lt;/span&amp;gt;&lt;br /&gt;
       &amp;lt;td&amp;gt;&lt;br /&gt;
     &amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Showing the data&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The invoice data is shown in regular input fields, but the borders are suppressed. Put the following in your &amp;quot;head&amp;quot; section.  &lt;br /&gt;
The bk tag makes adding a pagebreak easy.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;style&amp;gt;&lt;br /&gt;
        input {font-weight: bold; type=&amp;quot;text&amp;quot;; border: 0; font-size: 10px; readonly=&amp;quot;readonly&amp;quot;; }&lt;br /&gt;
        bk {page-break-after: always;}&lt;br /&gt;
    &amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:WaybillSample.JPG]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2354</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2354"/>
		<updated>2009-02-16T03:14:24Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Scroll down to the bottom and look at the screen shot.&lt;br /&gt;
&lt;br /&gt;
Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Showing the data&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The invoice data is shown in regular input fields, but the borders are suppressed. Put the following in your &amp;quot;head&amp;quot; section.  &lt;br /&gt;
The bk tag makes adding a pagebreak easy.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;style&amp;gt;&lt;br /&gt;
        input {font-weight: bold; type=&amp;quot;text&amp;quot;; border: 0; font-size: 10px; readonly=&amp;quot;readonly&amp;quot;; }&lt;br /&gt;
        bk {page-break-after: always;}&lt;br /&gt;
    &amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:WaybillSample.JPG]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2353</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2353"/>
		<updated>2009-02-16T03:07:50Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Scroll down to the bottom and look at the screen shot.&lt;br /&gt;
&lt;br /&gt;
Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:WaybillSample.JPG]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2352</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2352"/>
		<updated>2009-02-03T21:46:09Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Scroll down to the bottom and look at the image.&lt;br /&gt;
&lt;br /&gt;
Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:WaybillSample.JPG]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2351</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2351"/>
		<updated>2009-02-03T21:44:13Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:WaybillSample.JPG]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2350</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2350"/>
		<updated>2009-02-03T21:42:27Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2349</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2349"/>
		<updated>2009-02-03T21:41:51Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.  &lt;br /&gt;
[[Image:WaybillSample.JPG]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2348</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2348"/>
		<updated>2009-02-03T21:40:23Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.  &lt;br /&gt;
[[Image:waybillsample.jpg]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2347</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2347"/>
		<updated>2009-02-03T21:36:17Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.  &lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2346</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2346"/>
		<updated>2009-02-03T21:35:12Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.  &lt;br /&gt;
[[Image:WaybillSample.jpg]]&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=File:WaybillSample.JPG&amp;diff=2345</id>
		<title>File:WaybillSample.JPG</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=File:WaybillSample.JPG&amp;diff=2345"/>
		<updated>2009-02-03T21:31:13Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: Example invoice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example invoice&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2342</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2342"/>
		<updated>2009-02-03T15:23:37Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.  The &amp;quot;id&amp;quot;s shown in the above example are not necessary and are there only for purposes of identification.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly! And, be browser independent. If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2341</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2341"/>
		<updated>2009-02-03T14:50:09Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak as shown in the pseudo code below.  Printing of the invoice pages should track the browser layout exactly!  If it doesn&#039;t - the browser shows one way and printing shows everything in a different position, then something is incorrect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;20&amp;quot; name=&amp;quot;loadInfo__company_name&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 100px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__phone&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=1st image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;pagebreak here&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=2nd image...&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2340</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2340"/>
		<updated>2009-02-03T13:48:47Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normally a span or div tag with some kind of positioning will position itself relative to the upper left corner of the browser.  That would be ok if you only ever used that particular browser and only one page.  The difficulties begin when you page down and back, or print - the positioning becomes unstable and you can&#039;t count on anything being shown in exactly the same place every time.&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the above span tags.  Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak after the last span tag (inside the form tags) and add another complete set of html as shown above.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2339</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2339"/>
		<updated>2009-02-03T13:34:42Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create an HTML printable invoice for your customer with all of those little blocks and lines? And then try to electronically fill the required data in the little spaces?  It can be a challenge in Windows, and even more so in HTML.  There is an easier way than trying to do it as described above - instead, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of your invoice or create a copy of your invoice using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the span tags.  Absolute positioning prints at exactly those coordinates in relation to the top left corner of the browser.  The problem with this is that it can be unreliable by itself and can vary depending on the browser being used.  And if you have multiple pages, it gets worse.&lt;br /&gt;
&lt;br /&gt;
Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak after the last span tag (inside the form tags) and add another complete set of html as shown above.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2337</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2337"/>
		<updated>2009-02-02T18:17:03Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create a printable invoice with all of those little blocks and lines?  It can be a challenge, and even more so in HTML.  There is an easier way than trying to draw it though, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of one if available, or create one using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning in the span tags.  Absolute positioning prints at exactly those coordinates in relation to the top left corner of the browser.  The problem with this is that it can be unreliable by itself and can vary depending on the browser being used.  And if you have multiple pages, it gets worse.&lt;br /&gt;
&lt;br /&gt;
Relative positioning means that the coordinates are relative to something else.  So, the premise is that for each page we need to establish an anchor other than the browser window itself.  The id=&amp;quot;rel&amp;quot; span serves as the main anchor for the page, the id=&amp;quot;abs&amp;quot; tag will always appear in relation to the outer span tag.&lt;br /&gt;
&lt;br /&gt;
In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;br /&gt;
&lt;br /&gt;
If you want to have multiple pages, simply force a pagebreak after the last span tag (inside the form tags) and add another complete set of html as shown above.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2336</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2336"/>
		<updated>2009-02-02T18:11:11Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create a printable invoice with all of those little blocks and lines?  It can be a challenge, and even more so in HTML.  There is an easier way than trying to draw it though, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of one if available, or create one using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the use of both relative and absolute positioning.  Absolute positioning prints at exactly those coordinates in relation to the top left corner of the browser.  The problem with this is that it can be unreliable by itself and can vary depending on the browser being used.  And if you have multiple pages, it gets worse.&lt;br /&gt;
&lt;br /&gt;
Relative positioning means that the coordinates are relative to something else.  In the above case, the coordinates of id=”rel” are relative to the form and the coordinates of id=”abs” are relative to “rel”.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2335</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2335"/>
		<updated>2009-02-02T18:10:14Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create a printable invoice with all of those little blocks and lines?  It can be a challenge, and even more so in HTML.  There is an easier way than trying to draw it though, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of one if available, or create one using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;form&amp;gt;&lt;br /&gt;
        &amp;lt;span id=”rel” style=&amp;quot;FLOAT: left; POSITION: relative&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;span id=”abs” style=&amp;quot;LEFT: 28px; POSITION: absolute; TOP: 90px&amp;quot; &amp;gt;&lt;br /&gt;
               &amp;lt;td class=&amp;quot;Data&amp;quot;&amp;gt;&amp;lt;input size=&amp;quot;14&amp;quot; name=&amp;quot;loadInfo__pu_contact&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt;
           &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;img src=&amp;quot;images/Waybill.png&amp;quot; height=&amp;quot;881&amp;quot; width=&amp;quot;690&amp;quot; align=&amp;quot;left&amp;quot; alt=&amp;quot;Waybill.png&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2329</id>
		<title>Create an HTML Invoice</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Create_an_HTML_Invoice&amp;diff=2329"/>
		<updated>2009-01-31T14:34:08Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: New page: &amp;#039;&amp;#039;&amp;#039;The Goal&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; Ever need to create a printable invoice with all of those little blocks and lines?  It can be a challenge, and even more so in HTML.  There is an easier way than trying ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;The Goal&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Ever need to create a printable invoice with all of those little blocks and lines?  It can be a challenge, and even more so in HTML.  There is an easier way than trying to draw it though, place your data on top of an image.  Essentially it works like this.&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;The Form&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Create an exact size image.  For testing you can take a screen shot of one if available, or create one using Quark or one of the other similar products that are designed for this purpose.  Doing it this way provides a much nicer image.  Use a PNG file format, it’s more robust than JPG.&lt;br /&gt;
&lt;br /&gt;
A “span” tag is used to group HTML and can also be used to “hook” information onto that HTML.  Here we will use it to enforce accurate positioning of the data elements on top of the image.  An example will help.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=.jpeg&amp;diff=2046</id>
		<title>.jpeg</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=.jpeg&amp;diff=2046"/>
		<updated>2008-07-13T22:06:27Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;JPEG is an image type which is not natively supported by [[Visual DataFlex]].  To use JPEG files in VDF, an ActiveX control must be used.&lt;br /&gt;
&lt;br /&gt;
[[Category: File Types]] [[Category: Stub]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Talk:Run_only_one_instance_of_your_application&amp;diff=1664</id>
		<title>Talk:Run only one instance of your application</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Talk:Run_only_one_instance_of_your_application&amp;diff=1664"/>
		<updated>2007-12-30T17:08:58Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: New page: The advantage of Dalton&amp;#039;s method is that it can be placed at desktop, prior to any login dialogs.  The &amp;quot;panel&amp;quot; method would not work in my application because the panel isn&amp;#039;t created until...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The advantage of Dalton&#039;s method is that it can be placed at desktop, prior to any login dialogs.  The &amp;quot;panel&amp;quot; method would not work in my application because the panel isn&#039;t created until after the login dialog and the users wouldn&#039;t discover the error until after logging in for the second time - kludgy.&lt;br /&gt;
Bob Worsley&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=947</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=947"/>
		<updated>2007-11-21T14:19:23Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&#039;&#039;&#039;Creating a COM Interface for SMTP Email&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following &amp;quot;form&amp;quot; controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
  The SMTP host address - oHost&lt;br /&gt;
  From address - oFromAddr&lt;br /&gt;
  To address - oToAddr&lt;br /&gt;
  Subject - oSubject&lt;br /&gt;
  Message (body) - oMessage&lt;br /&gt;
  Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to “Send”&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object.&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.  Add the create statement just below the object declaration.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
  Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
  String sAttach sName&lt;br /&gt;
  Integer iRC&lt;br /&gt;
  Boolean bIsComObjectCreated&lt;br /&gt;
  &lt;br /&gt;
  Get IsComObjectCreated of oComMailSender to bIsComObjectCreated&lt;br /&gt;
  &lt;br /&gt;
  If (not(bIsComObjectCreated)) Begin&lt;br /&gt;
      Send CreateComObject to oComMailSender&lt;br /&gt;
  End&lt;br /&gt;
  &lt;br /&gt;
  Send ComReset to oComMailSender&lt;br /&gt;
  &lt;br /&gt;
  Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
  Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
  Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
  Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
  Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
  Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
  Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
  Get Value of oAttachment to sAttach&lt;br /&gt;
  If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
      Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
  End&lt;br /&gt;
            &lt;br /&gt;
  Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
  If (not(iRC)) send stop_Box &amp;quot;Email failed.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the addressee&#039;s “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=915</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=915"/>
		<updated>2007-11-20T13:47:00Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: /* &amp;#039;&amp;#039;&amp;#039;Creating a Com Interface for SMTP Email&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&#039;&#039;&#039;Creating a COM Interface for SMTP Email&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following &amp;quot;form&amp;quot; controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
  The SMTP host address - oHost&lt;br /&gt;
  From address - oFromAddr&lt;br /&gt;
  To address - oToAddr&lt;br /&gt;
  Subject - oSubject&lt;br /&gt;
  Message (body) - oMessage&lt;br /&gt;
  Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to “Send”&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object.&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.  Add the create statement just below the object declaration.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
  Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
  String sAttach sName&lt;br /&gt;
  Integer iRC&lt;br /&gt;
  Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
  Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
  Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
  Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
  Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
  Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
  Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
  Get Value of oAttachment to sAttach&lt;br /&gt;
  If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
      Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
  End&lt;br /&gt;
            &lt;br /&gt;
  Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the addressee&#039;s “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=914</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=914"/>
		<updated>2007-11-20T13:44:26Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following &amp;quot;form&amp;quot; controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
  The SMTP host address - oHost&lt;br /&gt;
  From address - oFromAddr&lt;br /&gt;
  To address - oToAddr&lt;br /&gt;
  Subject - oSubject&lt;br /&gt;
  Message (body) - oMessage&lt;br /&gt;
  Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to “Send”&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object.&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.  Add the create statement just below the object declaration.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
  Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
  String sAttach sName&lt;br /&gt;
  Integer iRC&lt;br /&gt;
  Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
  Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
  Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
  Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
  Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
  Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
  Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
  Get Value of oAttachment to sAttach&lt;br /&gt;
  If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
      Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
  End&lt;br /&gt;
            &lt;br /&gt;
  Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the addressee&#039;s “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=913</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=913"/>
		<updated>2007-11-20T13:24:48Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
*	The SMTP host address - oHost&lt;br /&gt;
*	From address - oFromAddr&lt;br /&gt;
*	To address - oToAddr&lt;br /&gt;
*	Subject - oSubject&lt;br /&gt;
*	Message (body) - oMessage&lt;br /&gt;
*	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to “Send”&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
String sAttach sName&lt;br /&gt;
Integer iRC&lt;br /&gt;
Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
Get Value of oAttachment to sAttach&lt;br /&gt;
If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
    Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
End&lt;br /&gt;
            &lt;br /&gt;
        Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=912</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=912"/>
		<updated>2007-11-20T13:21:22Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
*	The SMTP host address - oHost&lt;br /&gt;
*	From address - oFromAddr&lt;br /&gt;
*	To address - oToAddr&lt;br /&gt;
*	Subject - oSubject&lt;br /&gt;
*	Message (body) - oMessage&lt;br /&gt;
*	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to “Send”&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
	And then we need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
        String sAttach sName&lt;br /&gt;
	Integer iRC&lt;br /&gt;
        Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
        Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
        Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
        Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
        Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
        Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
        Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
        Get Value of oAttachment to sAttach&lt;br /&gt;
        If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
            Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
        End&lt;br /&gt;
            &lt;br /&gt;
        Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=911</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=911"/>
		<updated>2007-11-20T13:18:09Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
&lt;br /&gt;
·	The SMTP host address - oHost&lt;br /&gt;
·	From address - oFromAddr&lt;br /&gt;
·	To address - oToAddr&lt;br /&gt;
·	Subject - oSubject&lt;br /&gt;
·	Message (body) - oMessage&lt;br /&gt;
·	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
#	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
#	Add one button to the view and change the label to “Send”&lt;br /&gt;
#	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
#	We need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
        String sAttach sName&lt;br /&gt;
	Integer iRC&lt;br /&gt;
        Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
        Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
        Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
        Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
        Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
        Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
        Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
        Get Value of oAttachment to sAttach&lt;br /&gt;
        If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
            Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
        End&lt;br /&gt;
            &lt;br /&gt;
        Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
#	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
#	Click on Tools&lt;br /&gt;
#	Click Accounts&lt;br /&gt;
#	Select the account for your provider&lt;br /&gt;
#	Click Properties&lt;br /&gt;
#	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=910</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=910"/>
		<updated>2007-11-20T13:09:14Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
#	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
#	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
#	Select Import COM Automation &lt;br /&gt;
#	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
·	The SMTP host address - oHost&lt;br /&gt;
·	From address - oFromAddr&lt;br /&gt;
·	To address - oToAddr&lt;br /&gt;
·	Subject - oSubject&lt;br /&gt;
·	Message (body) - oMessage&lt;br /&gt;
·	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
1.	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
2.	Add one button to the view and change the label to “Send”&lt;br /&gt;
3.	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
4.	We need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
            String sAttach sName&lt;br /&gt;
	Integer iRC&lt;br /&gt;
            Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
            Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
            Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
            Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
            Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
            Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
            Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
            Get Value of oAttachment to sAttach&lt;br /&gt;
            If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
                Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
1.	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
2.	Click on Tools&lt;br /&gt;
3.	Click Accounts&lt;br /&gt;
4.	Select the account for your provider&lt;br /&gt;
5.	Click Properties&lt;br /&gt;
6.	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=909</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=909"/>
		<updated>2007-11-20T13:07:27Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
1)	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
&lt;br /&gt;
2)	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
3)	Select Import COM Automation &lt;br /&gt;
4)	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
·	The SMTP host address - oHost&lt;br /&gt;
·	From address - oFromAddr&lt;br /&gt;
·	To address - oToAddr&lt;br /&gt;
·	Subject - oSubject&lt;br /&gt;
·	Message (body) - oMessage&lt;br /&gt;
·	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
1.	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
2.	Add one button to the view and change the label to “Send”&lt;br /&gt;
3.	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
4.	We need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
            String sAttach sName&lt;br /&gt;
	Integer iRC&lt;br /&gt;
            Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
            Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
            Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
            Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
            Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
            Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
            Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
            Get Value of oAttachment to sAttach&lt;br /&gt;
            If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
                Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
1.	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
2.	Click on Tools&lt;br /&gt;
3.	Click Accounts&lt;br /&gt;
4.	Select the account for your provider&lt;br /&gt;
5.	Click Properties&lt;br /&gt;
6.	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=908</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=908"/>
		<updated>2007-11-20T13:06:43Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
1)	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
&lt;br /&gt;
2)	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
&lt;br /&gt;
3)	Select Import COM Automation &lt;br /&gt;
&lt;br /&gt;
4)	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
·	The SMTP host address - oHost&lt;br /&gt;
·	From address - oFromAddr&lt;br /&gt;
·	To address - oToAddr&lt;br /&gt;
·	Subject - oSubject&lt;br /&gt;
·	Message (body) - oMessage&lt;br /&gt;
·	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
1.	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
2.	Add one button to the view and change the label to “Send”&lt;br /&gt;
3.	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
4.	We need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
            String sAttach sName&lt;br /&gt;
	Integer iRC&lt;br /&gt;
            Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
            Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
            Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
            Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
            Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
            Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
            Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
            Get Value of oAttachment to sAttach&lt;br /&gt;
            If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
                Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
1.	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
2.	Click on Tools&lt;br /&gt;
3.	Click Accounts&lt;br /&gt;
4.	Select the account for your provider&lt;br /&gt;
5.	Click Properties&lt;br /&gt;
6.	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=907</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=907"/>
		<updated>2007-11-20T13:04:46Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;How SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It turns out that SMTP is very easy to implement, generally an activex dll will do the trick.  Having looked around at the available offerings, aspemail.dll, available for free at http://www.aspemail.com was selected.  The aspemail dll is free for the commonly used email functions, but costs for “premium” functionality, go to their site and see if it will work for you.&lt;br /&gt;
&lt;br /&gt;
The second reason that it was chosen is because it’s asp compatible and so will work when called from either a Windows server or from an ASP page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Dll Package Creation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually the easy part, believe it or not.  We will install the dll and create the Com interface.&lt;br /&gt;
&lt;br /&gt;
1)	Download the aspemail dll and register it per their instructions.&lt;br /&gt;
2)	In the VDF Studio (12.1 was used), go to File/New/Other and select the “Class” tab.&lt;br /&gt;
3)	Select Import COM Automation &lt;br /&gt;
4)	Select “Persists Software AspEmail 5.x” and click “Ok”&lt;br /&gt;
&lt;br /&gt;
This will create a VDF package named aspemail.pkg that can be used without modification in your application.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The View&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a simple one-view test application.  On the view you will need the following form controls and name the form objects as indicated:&lt;br /&gt;
·	The SMTP host address - oHost&lt;br /&gt;
·	From address - oFromAddr&lt;br /&gt;
·	To address - oToAddr&lt;br /&gt;
·	Subject - oSubject&lt;br /&gt;
·	Message (body) - oMessage&lt;br /&gt;
·	Attachment - oAttachment&lt;br /&gt;
&lt;br /&gt;
In addition, take the following steps&lt;br /&gt;
&lt;br /&gt;
1.	Add “Use aspemail.pkg” to the top of your code, outside the view itself&lt;br /&gt;
2.	Add one button to the view and change the label to “Send”&lt;br /&gt;
3.	Add the following object to the top of the view, anywhere inside or outside of the view itself:&lt;br /&gt;
&lt;br /&gt;
    Object oComMailSender is a cComMailSender&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
4.	We need to create the object&lt;br /&gt;
&lt;br /&gt;
    Send CreateComObject to oComMailSender&lt;br /&gt;
&lt;br /&gt;
The COM object must be created prior to it’s being used.  One of the common problems is once the code is complete you get an error about the object being activated before it’s instantiated.&lt;br /&gt;
&lt;br /&gt;
In aspemail.pkg at the bottom in class cComMailSender you will find a line as follows:&lt;br /&gt;
&lt;br /&gt;
Set peAutoCreate to acNoAutoCreate&lt;br /&gt;
&lt;br /&gt;
When an activex component is created, this is set to AutoCreate, but when a COM Automation component is created, it’s set to NoAutoCreate.  This could be changed in aspemail.pkg or simply add the line as shown above.   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Sending the email&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Inside the OnClick event in the “Send” button added above, add the following code:&lt;br /&gt;
&lt;br /&gt;
            String sAttach sName&lt;br /&gt;
	Integer iRC&lt;br /&gt;
            Set ComUserName of oComMailSender to &amp;quot;YourEmailLoginID&amp;quot;&lt;br /&gt;
            Set ComPassword of oComMailSender to &amp;quot;YourEmailLoginPassword&amp;quot;&lt;br /&gt;
            Set ComHost of oComMailSender to (Value(oHost))&lt;br /&gt;
            Set ComFrom of oComMailSender to (Value(oFromAddr))&lt;br /&gt;
            Set ComSubject of oComMailSender to (Value(oSubject))&lt;br /&gt;
            Set ComBody of oComMailSender to (Value(oMessage))&lt;br /&gt;
            Send ComAddAddress to oComMailSender (Value(oToAddr))  sName&lt;br /&gt;
            Get Value of oAttachment to sAttach&lt;br /&gt;
            If (trim(sAttach) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin &lt;br /&gt;
                Send ComAddAttachment to oComMailSender sAttach&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Get ComSend of oComMailSender &amp;quot;&amp;quot; to iRC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;SMTP Host&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To determine who your SMTP host is, do the following&lt;br /&gt;
1.	Bring up your mail client.  For Outlook or Outlook Express…&lt;br /&gt;
2.	Click on Tools&lt;br /&gt;
3.	Click Accounts&lt;br /&gt;
4.	Select the account for your provider&lt;br /&gt;
5.	Click Properties&lt;br /&gt;
6.	On the “Server” tab use the entry from “Outgoing mail (SMTP)”&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Operation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Fill in the fields and click “Send.”  You will need valid email addresses for the “from” and “to” and the attachment is optional.&lt;br /&gt;
&lt;br /&gt;
In the code above, notice the “sName” variable.  A name is not required for the “To” address, but if not used, a null value must be sent to the ComAddAddress procedure to avoid an error.  Another control for the “name” could be added to the form.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;In Conclusion&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look in the aspemail.pkg and you will see a large list of functions and procedures that may be used with this dll.  Remove the “com” from the front of the method name and the remaining name is the one that is used in the aspemail manual, so figuring out how things work is relatively easy.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=906</id>
		<title>SMTP Email</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=SMTP_Email&amp;diff=906"/>
		<updated>2007-11-20T13:00:48Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: New page: &amp;#039;&amp;#039;&amp;#039;Creating a Com Interface for SMTP Email&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Why SMTP?&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;  MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Creating a Com Interface for SMTP Email&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Why SMTP?&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MAPI email works fine from within VDF, but if using Outlook or Outlook Express, it can be quite annoying, especially if the email is sent automatically from a background program like a service.  The problem is that it wants to be sure that the email being sent is not from a Trojan horse or some other hidden program and will pop up a message asking if the message is being sent by “you”.  When being sent from a service, that’s a killer, as you will not know why your application just halts.  This can supposedly be turned off if using Outlook Express as your mail client, but not with Outlook.  There are some third party products that can help with this, but using SMTP seems to just be much easier.&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=COM&amp;diff=893</id>
		<title>COM</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=COM&amp;diff=893"/>
		<updated>2007-11-20T00:34:51Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;it is possible to use functionality from COM Objects using Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= using COM objects =&lt;br /&gt;
[[CodeJock]] is integrated in Visual DataFlex 12.1 and up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Integration]]&lt;br /&gt;
&lt;br /&gt;
[[Example of a simple COM object creation - SMTP Email]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=COM&amp;diff=890</id>
		<title>COM</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=COM&amp;diff=890"/>
		<updated>2007-11-19T23:25:03Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;it is possible to use functionality from COM Objects using Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= using COM objects =&lt;br /&gt;
[[CodeJock]] is integrated in Visual DataFlex 12.1 and up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Integration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Example of a simple COM object creation - SMTP Email]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=COM&amp;diff=889</id>
		<title>COM</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=COM&amp;diff=889"/>
		<updated>2007-11-19T23:24:35Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;it is possible to use functionality from COM Objects using Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= using COM objects =&lt;br /&gt;
[[CodeJock]] is integrated in Visual DataFlex 12.1 and up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Integration]]&lt;br /&gt;
&lt;br /&gt;
[[Example of a simple COM object creation - SMTP Email]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=COM&amp;diff=888</id>
		<title>COM</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=COM&amp;diff=888"/>
		<updated>2007-11-19T23:23:18Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;it is possible to use functionality from COM Objects using visual dataflex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= using COM objects =&lt;br /&gt;
[[CodeJock]] is integrated in Visual DataFlex 12.1 and up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Integration]]&lt;br /&gt;
&lt;br /&gt;
[[Example of a simple COM object creation - SMTP Email]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=COM&amp;diff=887</id>
		<title>COM</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=COM&amp;diff=887"/>
		<updated>2007-11-19T23:22:40Z</updated>

		<summary type="html">&lt;p&gt;Bworsley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;it is possible to use functionality from COM Objects using visual dataflex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= using COM objects =&lt;br /&gt;
[[CodeJock]] is integrated in Visual DataFlex 12.1 and up&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Integration]]&lt;br /&gt;
[[Example of a simple COM object creation - SMTP Email]]&lt;/div&gt;</summary>
		<author><name>Bworsley</name></author>
	</entry>
</feed>