MS Access VBA: Sending an email through Outlook -
how can send email through account using ms access vba? know question vague it's hard find relevant information online isn't outdated in way.
edit: don't mean rude answering, i using ms access. cannot write actual code in outlook vba.
add reference outlook object model in visual basic editor. can use code below send email using outlook.
sub sendoutlookemail() dim oapp outlook.application dim omail mailitem set oapp = createobject("outlook.application") set omail = oapp.createitem(olmailitem) omail.body = "body of email" omail.subject = "test subject" omail.to = "someone@somewhere.com" omail.send set omail = nothing set oapp = nothing end sub
Comments
Post a Comment