Need help emailing a invoice

pacotx

Registered User.
Local time
Yesterday, 22:19
Joined
May 25, 2006
Messages
13
Hi,
I have become a ebay seller and every time I sell something I put all of the info into a Access form. But what I want to do Is to be able to email a invoice. I have looked all though Microsoft help center and I didn't get anything I wanted. Here is a example:

To: [email address]@[host].[web]
Title: Your invoice from Andrew

BODY:
[ebay ID],
Thank you for your purchase of a [item].
We hople the transaction goes well!

Invoice:
>>>>> Price: [price]
>>>Shipping: [shipping]
>>insurance: [insurance]
_________________________
>>>>>Total: [total]________

Could someone help me?? If there is a way can you also teach me how to do news letters as well?
Thanx for your time,
Andrew:)
P.S. I know that there is a insert object that you can email, but I don't thing you can send it to different people, or have it show up as text and not a file.
 
I found this code on a different thread:
Function exporthtml()

Dim strline, strHTML

Dim OL As Outlook.Application
Dim MyItem As Outlook.MailItem

Set OL = New Outlook.Application
Set MyItem = Outlook.Application.CreateItem(olMailItem)

DoCmd.OutputTo acOutputReport, "Catalog", acFormatHTML,
"C:\myreport.html"

Open "C:\myreport.html" For Input As 1
Do While Not EOF(1)
Input #1, strline
strHTML = strHTML & strline
Loop
Close 1
' If OL2002 set the BodyFormat
If Left(OL.Version, 2) = "10" Then
MyItem.BodyFormat = olFormatHTML
End If
MyItem.HTMLBody = strHTML
MyItem.Display

End Function

How do u put this into Access? Does this alow the To: to have a field name in it?
sry for posting 2 threads,
Andrew:)
 
The simplest for you would be

DoCmd.SendObject

presuming you can get the address and other data off of your form. Check that out in VBA Help and post back if you have questions.
 
what is DoCmd.SendObject?
Can a field be in the "To:" using DoCmd.SendObject?
Would I make a button to send this email?
Sry my skills in macro's and VBA is a little low
 
No problem; we all start out with our skills a little low. The way to improve them is to use them. You can use a button to send the email. Your other questions are addressed in VBA Help, which should be the first stop on your journey.
 
pbaldy said:
No problem; we all start out with our skills a little low. The way to improve them is to use them. You can use a button to send the email. Your other questions are addressed in VBA Help, which should be the first stop on your journey.

Thanx so much for your help! :)
 
How do you make a field name the email address. :)
 
Create a string variable at the beginning of your code. At some point set it:

strTo = Me.EmailAddress

Then use that in SendObject:

DoCmd.SendObject acSendNoObject, , , strTo, ...
 
I am so confused how do you set up the code? The only language I know really well is HTML. Can you say it in smaller steps?
 

Users who are viewing this thread

Back
Top Bottom