ttamilvanan81
New member
- Local time
- Today, 11:17
- Joined
- Mar 30, 2007
- Messages
- 6
Hai,
Am doing the Access Module to Send and Receive Email with Attachments via Ms-Access and OutLook.
The attachment was. The form contain one Browse Button. If we click that Browse button, will go to select the Location(file path) of the selected File.
That path will go to locate the Text Box.
Now i am using the following code for Send Email only. In this code the Attachment working as, we type the attachment file path Manually. But i need the Browse Button to select the file.
I need to Browse and select a file, the selected file path stored into a text file.
And i need to Receive Email.
Private Sub Command20_Click()
Dim mess_body As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.BodyFormat = olFormatRichText
.To = Me.Email_Address
.CC = Me.Cc_Address
.BCC = Me.Bcc_Address
.Subject = Me.Mess_Subject
.HTMLBody = Me.Mess_Text
If Left(Me.Mail_Attachment_Path, 1) <> "<" Then
.Attachments.Add (Me.Mail_Attachment_Path)
End If
.Send
End With
Exit Sub
email_error:
MsgBox "An error was encountered." & vbCrLf & "The error message is: " & Err.Description
Resume Error_out
Error_out:
End Sub
I know the Microsoft Common Dialog Control doing this. But in my Access forms i can't see the Common Dialog Control.
So i go to click the more controls button, and select the Microsoft Common Dialog Control, version 6.0. Then i am trying to put this contron in my form, one error occured. The error message is:
you don't have the license required to use this ActiveX control.
you tried to open a form containing an OLE object or an ActiveX control or you tried to create an ActiveX control. To obtain the appropriate license, contact the company that provides the licensed OLE object or ActiveX control.
Then i go and try to register the ActiveX control. But again i have the error message.
c:\windows\system32\comctl32.dlll was loaded, but the DllRegisterServer entry point was not found.
This file can not be registered.
This error message was displayed. So that i have stucked.
Anybody can know, how to solve this problem. please let me know.
Thanks
Tamilvanan
Am doing the Access Module to Send and Receive Email with Attachments via Ms-Access and OutLook.
The attachment was. The form contain one Browse Button. If we click that Browse button, will go to select the Location(file path) of the selected File.
That path will go to locate the Text Box.
Now i am using the following code for Send Email only. In this code the Attachment working as, we type the attachment file path Manually. But i need the Browse Button to select the file.
I need to Browse and select a file, the selected file path stored into a text file.
And i need to Receive Email.
Private Sub Command20_Click()
Dim mess_body As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.BodyFormat = olFormatRichText
.To = Me.Email_Address
.CC = Me.Cc_Address
.BCC = Me.Bcc_Address
.Subject = Me.Mess_Subject
.HTMLBody = Me.Mess_Text
If Left(Me.Mail_Attachment_Path, 1) <> "<" Then
.Attachments.Add (Me.Mail_Attachment_Path)
End If
.Send
End With
Exit Sub
email_error:
MsgBox "An error was encountered." & vbCrLf & "The error message is: " & Err.Description
Resume Error_out
Error_out:
End Sub
I know the Microsoft Common Dialog Control doing this. But in my Access forms i can't see the Common Dialog Control.
So i go to click the more controls button, and select the Microsoft Common Dialog Control, version 6.0. Then i am trying to put this contron in my form, one error occured. The error message is:
you don't have the license required to use this ActiveX control.
you tried to open a form containing an OLE object or an ActiveX control or you tried to create an ActiveX control. To obtain the appropriate license, contact the company that provides the licensed OLE object or ActiveX control.
Then i go and try to register the ActiveX control. But again i have the error message.
c:\windows\system32\comctl32.dlll was loaded, but the DllRegisterServer entry point was not found.
This file can not be registered.
This error message was displayed. So that i have stucked.
Anybody can know, how to solve this problem. please let me know.
Thanks
Tamilvanan
Last edited: