Email Form

polarbear199
11-29-2001, 10:32 PM
I'm using the following code for a registration. Is there a way to add a submit button that will automatically press send on the users default Email Program?

Private Sub btnSendInfo_Click()
FileNum = FreeFile
Open "D:\reg.txt" For Append As FileNum
Write #FileNum, txtCustomerName.Text, txtCompanyName.Text, txtCompanyAddress.Text, _
txtCompanyCity.Text, txtCompanyState.Text, txtCompanyZip.Text, _
txtCompanyPhone.Text, txtCompanyFAX.Text, txtCompanyEmail.Text
Close FileNum
FileNum = FreeFile
Open "D:\reg.txt" For Input As FileNum
EmailBody = Input(LOF(FileNum), FileNum)
Close FileNum
email = "Start mailto:Purepro@Verizon.net"
email = email & "?Subject=Catalog_CDROM_Registration"
email = email & "&Body="
email = email & EmailBody
Shell (email), vbHide
End Sub

Ales Zigon
12-03-2001, 01:08 PM
Hi!

You can use SendKeys to do the job for you. What keys are to be send depends on the Mail program of the user. If it's gonna be Outlook then just look for under scored Characters in its SendMail button to read the sequence and then sed RETURN ( to hit Connect button).
Basicly it should work - basicly!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum