hai
I need the clarification for Common Dialog Control in Ms-Access.
am doing the Ms-Access application, in this application, i need to send and receive email. Now am doing the send mail, it’s working fine. But the attachment is not working. Am using the coding for send mail as follows
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
‘ .SenderEmailAddress = From_Address
.To = Me.Email_Address
If (Cc_Address.Value = Null) Then
‘MsgBox “CC Address field does not contain any E-mail Address”
Else
.CC = Me.Cc_Address
End If
If (Bcc_Address.Value = Null) Then
‘MsgBox “BCC Address field does not contain any E-mail Address”
Else
.BCC = Me.Bcc_Address
End If
.Subject = Me.Mess_Subject
.HTMLBody = Me.mess_text
‘ .Attachments = Mail_Attachment_Path
If Left(Me.Mail_Attachment_Path, 1) <> “<" Then
.Attachments.Add (Me.Mail_Attachment_Path)
End If
'.DeleteAfterSubmit = True 'This would let Outlook send th note without storing it in your sent bin
.Send
End With
'MsgBox MailOutLook.Body
Exit Sub
email_error:
MsgBox "An error was encountered." & vbCrLf & "The error message is: " & Err.Description
Resume Error_out
Error_out:
But in this code the attachment file path as we enter manually, i need the browse button to browse the file, and the selected file path was located in a text box.
This type of attachment i need it. I know this is like for Common Dialog Control. But if i were go to the toolbox. The common dialog control is not visible. Then i click the more controls button, and i select the Windows Common Dialog Control and put it into the Ms-Access form. One error message wa displayed.
The error message is.
you don't have the license required to use this ActiveX control.
you tried to open a form c ontaining 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.
So Anybody know, why this error could be occured? I guess to Rectify this error. The attachment option will be completed i think.
So If anybody know how to do the attachment or to rectify this error, please let me know.
Thanks
Tamilvanan