26. (Advanced Programming In Access 2013) Send Outlook Email With VBA

  Рет қаралды 77,972

Programming Made EZ

Programming Made EZ

Күн бұрын

Пікірлер: 105
@freebird7556
@freebird7556 3 жыл бұрын
I always thank to Steve.. for more than 5 years.. simple, easy, and get to direct point, and very kind instruction...
@freebird7556
@freebird7556 3 жыл бұрын
Surely this is the very best instruction on email sending from Access!!!!!!!
@katrinasmith5108
@katrinasmith5108 9 жыл бұрын
I have looked everywhere for an email solution. This is great - you explain everything so well and best of it - it works!! Thanks heaps
@mividalocastudio9366
@mividalocastudio9366 2 жыл бұрын
Dude you're a GENIUS! Thanks for this video.
@omg2mad4u
@omg2mad4u 9 жыл бұрын
Great vid Steve. Thanks for all your great stuff. I have watched all of it and look forward to each new one.
@havaljamal9952
@havaljamal9952 3 жыл бұрын
Thank you so much for the comprehensive clarification, in the attachment section, how if we would to attached a report in the access itself, instead of selecting a file ??
@swapnilwankhede3440
@swapnilwankhede3440 7 жыл бұрын
Hi Steve Excellent Tutorials, Thanks a lot Steve for uploading this videos, it’s really helpful, never found such good videos.
@laarnidinu
@laarnidinu 6 жыл бұрын
Thank you Steve you've demonstrated the best! Could you please include a video on how to include the outlook signature at the end of the email and i'm thinking is it possible to grab the data from a report and paste in the body? Thanks so much for your help
@shakey3258
@shakey3258 9 жыл бұрын
Thanks for the vid. Any chance on doing a vid on Incoming/received outlook emails = how to get them into Access...Keep up the great work. Really loved your howto on setting up an SQL server
@sangaramedi
@sangaramedi 7 жыл бұрын
Hi Sir, i have error Run-time error '287: Application-defined or object-defined error. When I select "Debug" "send" .send
@hanvu1951
@hanvu1951 7 жыл бұрын
Great video Steve. I just want to ask a stupid question could you please show how to add form1 with all the button browse, clear, and send. thanks
@andersonnwammadi7303
@andersonnwammadi7303 6 жыл бұрын
Great work Steve ! Please in what video did you create the Clear, Brows and Send button in the form?
@gsommers1
@gsommers1 6 жыл бұрын
Steve, these videos are incredibly helpful! I am very grateful. You reference another video where you show how to put a PDF inside of Access. Mind sharing a link? Thanks again, the amount of time you put into these videos shows, and thanks again for the great tutorials!
@active769
@active769 4 жыл бұрын
Thanks for the video. I want to ask. Is there a way that you can send an invite to someone to add on both of your outlook calendars?
@johnchukwudi6146
@johnchukwudi6146 7 жыл бұрын
Hi Steve, thank you for your exposure in this topic. My question here is how can I send an email with one field hidden. That is, I want when I am sending an email from my Access App, the form should copy the mac address of the send without the knowledge of the sender. I just want whenever an email is sent to me, It should contain the MAC address of the sender to me without the knowledge of the sender. Is this possible?
@dankirchner4460
@dankirchner4460 4 жыл бұрын
Hello Sir. I know this is an older video so I hope you'll get this message. I took the form1 and put it in my DB. Im running access 2016 and seem to get a application defined or object defined error at the oEmail.send part of the code. Additionally I am using the adjusted code from video number 27 because I think it'll fit my needs best. Any change you can coach me through this?
@slewcity140
@slewcity140 6 жыл бұрын
this was excellent thank you. I generate about 300 statements from an access application I created. I have code that filters statements to be sent by postal mail and statement to be emailed only. Now the email only list is getting large. when I run the report their are many email only statement. I would like to create a routine that would convert the many statements for each customer generated in one report to a pdf then email each one to the associated email address for that customer and run as a batch. Any ideas?
@yelirnoed
@yelirnoed 6 жыл бұрын
Hi Steve, and thank you for this excellent video. I'm using your timer video and am able to auto send out an email using the timer logic which works beautifully combining this email logic with the timer logic...:) If I may trouble you however: How would I automatically open and attach a single report within my access reports as an attachment as opposed to browsing to a folder and attaching a document? Can this be done? I look forward to hearing from you. My Best, YelirNoed.
@akashtribhuvan8124
@akashtribhuvan8124 5 жыл бұрын
I have created a data entry form with Subject line (Text), Email Body (Text) and an Ole Object box in which I paste the screen shot. Now on save button click, data gets added to the table and also drafts an email with the same subject line and email Body. ***CONCERN I am facing with the ole object IMAGE, which I want automatically to be in the email body below the text. Is there any way to do so, if not then any alternative or suggestions?
@TheAnthonychalloner
@TheAnthonychalloner 6 жыл бұрын
Great work again Steve. Only wish is that you could take the integration of outlook further, like how to format the body text to allow inclusion of graphics and formatted text from perhaps a word template. I regularly send emails from within Access to club members using a store of pre-defined templates but cannot find a method of including the clubs logo and buttons with hyperlinks embedded. I currently open an email with the recipient's email address, subject and a greeting. Then copy and paste word template in the body of the e-mail a painfully slow operation when sending to 150 individuals. I have searched the web only to find that it "cannot be done in anything but plain text" unless I want to spend hundreds of $s on a specially designed programme. Please Help Steve, I'm sure you know how to achieve this.
@active769
@active769 4 жыл бұрын
Question, I am running Access 2016, I used the send email code, but I get the "Compile Error: User-defined typed not defined" in reference to Dim oApp As New Outlook.Application... Can you help me with this? thanks
@ehteshamshah
@ehteshamshah 4 жыл бұрын
Dear do u plz tell me how to get data from electronic weigh machine to Access data base. Waiting for ur reply.
@ssakthish1
@ssakthish1 9 жыл бұрын
Hello,I don't want to add the attachment, instead I want the data in the form (Including the Textbox & Label) to be generated in the body of the outlook with table format. Is that possible?
@kazuo_ohashi
@kazuo_ohashi 9 жыл бұрын
Thank you Steve ! Great tips on how to integrate Outlook with Access. Can I make a suggestion , Is it possible to create, and most important, update a Outlook contact from a Access table ?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Kazuo Ohashi Yes. You can use the MAPI namespace to find the contact and update it. This is VERY involved.
@johnwatkins39
@johnwatkins39 8 жыл бұрын
great video, with the email textbox, can i paste an email address, for example 10 +, i think i could i may have to make the textbox bigger to be able to see some of the emails in the textbox.
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
You can.
@rickl2834
@rickl2834 6 жыл бұрын
Is there a way to do multiple attachments on an email? I’d like to send a pic and spreadsheet on one email as opposed to two separate ones. Thank you.
@kadnacer7571
@kadnacer7571 5 жыл бұрын
Hi Steve, how can we add signature to email based on default one created in outlook
@ristantosky
@ristantosky 6 жыл бұрын
how to use email protocol without depend on user outlook ? I meant can we use outlook from server or there are ways to do that ?
@Holmes213
@Holmes213 6 жыл бұрын
So, I put this in my database and i am getting question marks in front of the file path. e.g. "??C:\Documents\Attachment.pdf". I then get an error "Run-time error '-2147024773 (8007007b)': File name or directory name is not valid." Why is it placing question marks in my file?
@miggy71
@miggy71 7 жыл бұрын
Hi Steve, Instead of a path to a file attachment, is there a way to attach an Access Query in Excel format? I tried using DoCmd.SendObject and set the EditMessage Parameter to 'False' but it still opens the email and requires me to hit 'Send'. I just want it to send immediately. Must I save the excel/query file and use that path as you've done in this demo? Thanks in advance. Follow up, I did a DoCmd.OutputTo acOutputQuery for my query (which seems to work fine) and now I'm getting Error 287 (application-defined or object defined error). Code stops at the ".Send" line. I noticed if I mouse over the "oEmail.To" or "oEmail.Body" it shows the error text, but the "oEmail.Subject" shows the subject I entered.
@WafferG
@WafferG 7 жыл бұрын
I have a question , lets say I have the emails in tblWorkers , And I made a select query to select all the emails . Is there any way I can send an email to all these people ina press of a button , I dont want the user to write the emails in the To: box or to mess with any email addresses or anything so to speak , just one button that will send an email to all the email adresses selected in a query , is something like this possible, There is a paid add on for access but it costs 500$ , Inlighten me.
@rickguest1580
@rickguest1580 8 жыл бұрын
Hi Steve, I'm really enjoying all your MS Access courses. There's a lot of great information in them, and I find how you present it helps me understand it. Thanks ! Since you presented how to use Outlook mail from Access / VBA in this video it made me wonder if the rest of Outlook can be accessed (no pun intended) from Access / VBA. Can I get or put entries in my Contacts ? Or read or update my Calendar ?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
Yup. You can access contact, Calendar, tasks, etc.
@abiramimannarmannan2314
@abiramimannarmannan2314 6 жыл бұрын
can u pls share video to automatic generating mail to birthday people using ms access
@simplestsofthazlosencillo3078
@simplestsofthazlosencillo3078 4 жыл бұрын
How can I send an access report like an attachment with this code ?
@jooryalhamed938
@jooryalhamed938 5 жыл бұрын
Hello, thank you so much for your wonderful and useful videos. I followed your code but that gave me a run time error "invalid use of null" why do you think I got this error and you didn't?
@rajeshwargarlapalli790
@rajeshwargarlapalli790 7 жыл бұрын
Hi All, I need your help to create a macro, I have an excel file in Outlook mail box, which need to be copied to MS Access. How can I get that?
@anhongoc6277
@anhongoc6277 7 жыл бұрын
Hi Sir, I'm trying to send a an email to customer. The email is exactly the report which have an attachment in it. I want to use the report content for the email body, and automatically attach the attachment in the report into to email attachment and then send. I really appreciate any help!
@kennynelson398
@kennynelson398 6 жыл бұрын
Can you attach a FILTERED report to an email using this method?
@dniezby
@dniezby 7 жыл бұрын
What if I have several email accounts in my outlook and I want to send from a specific account? How would I pull that off?
@matthewjones9070
@matthewjones9070 9 жыл бұрын
Would I be able to take this bit of code and throw it in to an application I'm working on in Visual Studio? I can't see why it would not work. my only question is what about authentication?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Matthew Jones .NET and Access are not compatible.
@katrinasmith5108
@katrinasmith5108 9 жыл бұрын
Instead of using the Browse button - and I wanted to attach a report from within the database (as a default) - how do I find the path of the report?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Katrina Smith You could first save the report as a file, save the filename in a variable, and replace the attachment value with the filename variable.
@Paw0452
@Paw0452 8 жыл бұрын
Hi Steve, your videos are a great help to me. I have implemented the vba for sending an email from Access 2010 but I must have Outlook open else I get the error message "Application-defined or object-defined error" when the code reaches this line of code : "oEmail.Recipients.Add v_email_in" where v_email_in is the email address. I am missing something in the code?
@Paw0452
@Paw0452 8 жыл бұрын
Steve, I get the same result using early or late binding. Thanks
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
It is too difficult to know based on your message. My best guess is you need to make sure the email address is a string.
@childrenshealth
@childrenshealth 9 жыл бұрын
How Can I populate the .to field with data from an existing form? And can I use it to open an existing custom form template in outlook that I have created already?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Raise Your Kids Healthy By Nathani Clinic just set the to property to the value from the textbox.
@drtonys.6963
@drtonys.6963 6 жыл бұрын
using openargs, then onopen event me.to = me.openargs
@luisvalenzuela8297
@luisvalenzuela8297 9 жыл бұрын
Hello Steve, I'm recently working with Access to program a small application for production purposes, where a person fills the blank spaces and then sends a requisition to the department. When they click on a button (Save button) this one generates an automatic mail response to the applicant and the responsible to attend the issue. My doubt is that the email body is not being sent correctly, I'm using this part of the code to send the body: (Email_Body = Me.APLICANT.Column(1, Me.APLICANT - 1) & " ha solicitado un cambio de ingeniería en: " & Me.PART_NUMBER & Chr(13) & Me.DESCRIPTION.Text) where every variable is correctly defined but when you open the mail it has no body, the code shows no mistake either... I wonder what do you think about this issue?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Luis Valenzuela What happens if you take the variables out?
@luisvalenzuela8297
@luisvalenzuela8297 9 жыл бұрын
+Programming Do you mean the ones that are defined at the beginning of the subform for the Save button?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Luis Valenzuela Anything that refers to a value which is retrieved from the form. As in, what happens when you try to send the email as just text that you write up as a string.
@toneill360
@toneill360 7 жыл бұрын
Hi Steve, I have created an app with access that uses this send email with outlook. I built the app in office 16 and it works without any issues. However, when opened with office 13 there is an error with the vb. The outlook reference is turned on with the 13 version. Any suggestions?
@toneill360
@toneill360 7 жыл бұрын
So, it seems that Outlook references in vb are not backward compatible... Currently, if I need to make any changes in with the vb, I have to open the app and save it in office 13 to work with both versions.
@abuaksham
@abuaksham 8 жыл бұрын
Thanks for the useful information. can I open a saved .msg file (saved e mail) and reply to it through Access ?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
You can, but that's a bit beyond the scope of any of my courses, and there's not a lot of requests for something this specific.
@lilkimmacdaddy8542
@lilkimmacdaddy8542 7 жыл бұрын
Hi Steve, the codes work via Outlook 2013 and not Outlook 2016. I have set the reference to Outlook 2016 Library. Any help you could provide would greatly be appreciated. Thanks!
@SunehaJulka
@SunehaJulka 4 жыл бұрын
I am facing the same issue. Can anyone help please
@quranaurhadeesno.1491
@quranaurhadeesno.1491 5 жыл бұрын
sir, can we send sms from ms access?
@aboutKINGYEUNG
@aboutKINGYEUNG 8 жыл бұрын
If Len(Me.txtAttachment) > 0 Then oEmail.Attachments.Add Me.txtAttachment.Value End If i cannot debug it with .value is there any code need to be done before use?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
Instead of len(me.txtattachment) > 0, do If Not IsNull(me.txtAttachment) then. You should also use a File System Object to check if the file exists before attaching it.
@youtubetube1815
@youtubetube1815 9 жыл бұрын
im getting a "user-defined type not defined" error on the line : Dim fileDiag As FileDialog
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+KZbin Tube Sounds like you're missing a reference.
@islahiyette1
@islahiyette1 6 жыл бұрын
i want send a querey in boduy mail?? how
@WVUTOAD1
@WVUTOAD1 8 жыл бұрын
So when I hit "Send", I get a Run-time error '287: Application-defined or object-defined error. When I select "Debug", it highlights "If Not IsNull(.To) And Not IsNull(.Subject) And Not IsNull(.Body) Then" It's getting frustrating because I even downloaded the code and copied it just to make sure I didn't put in an extra space and it still gives me the same error.
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
Are you sure you're inside of a With block?
@WVUTOAD1
@WVUTOAD1 8 жыл бұрын
Private Sub btnSend_Click() Dim oApp As New Outlook.Application Dim oEmail As Outlook.MailItem Set oEmail = oApp.CreateItem(olMailItem) oEmail.To = Me.txtTo oEmail.Subject = Me.txtSubject oEmail.Body = Me.txtBody If Len(Me.txtAttachment) > 0 Then oEmail.Attachments.Add Me.txtAttachment.Value End If With oEmail If Not IsNull(.To) And Not IsNull(.Subject) And Not IsNull(.Body) Then .Send MsgBox "Email Sent!" Else MsgBox "Please fill out the required fields." End If End With oEmail.Send End Sub
@cindyhe5609
@cindyhe5609 6 жыл бұрын
@@WVUTOAD1 Have you solve this problem, I also got the same error. Please tell me if you got solved.
@johndavy3820
@johndavy3820 6 жыл бұрын
Steve, I am getting errors with your code. I have screen clips to send you. Can you reply to me so I can send them? I have subscribed.
@MegaMohammad2011
@MegaMohammad2011 7 жыл бұрын
Hi Steve, Can you teach me how to create automatic email sender in access? I want it to send email through outlook automatically
@ProgrammingMadeEZ
@ProgrammingMadeEZ 7 жыл бұрын
Isn't that what this video teaches you?
@MegaMohammad2011
@MegaMohammad2011 7 жыл бұрын
Not really. I want it to open outlook by itself and send a general email to like multiple people. Like an automated reminder email for overdue tasks or such.
@MegaMohammad2011
@MegaMohammad2011 7 жыл бұрын
Programming I would appreciate it though
@ProgrammingMadeEZ
@ProgrammingMadeEZ 7 жыл бұрын
So add multiple emails in the oEmail.To. As for automated tasks, watch my video on how to use a timer. kzbin.info/www/bejne/mnqtiXmjraiAqtU
@MegaMohammad2011
@MegaMohammad2011 7 жыл бұрын
Awesome video. I figured out everything. But I have one more issue. After the email is being written, I run command ".Display" so I can review the email and see if it is being run properly, but my signature happens to get lost. I have a signature on my outlook that would pop up with a new message. Is there a way I could run a command that would bring my signature back again with out me trying to rewrite it as a string?
@KeffelewAssefa
@KeffelewAssefa 2 жыл бұрын
Thank you.
@mohamedwahba7024
@mohamedwahba7024 Ай бұрын
good sir
@smarmanos
@smarmanos 9 жыл бұрын
Doesn't work with Access 2007 for some reason.
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Manos Smar What kind of error are you getting? At what point doesn't it work?
@smarmanos
@smarmanos 9 жыл бұрын
+Programming I get an "Application-defined or object-defined error. Where can I send you a screen shot?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Manos Smar I suggest doing a screen shot and posting it to imgur, then post the link here.
@smarmanos
@smarmanos 9 жыл бұрын
+Programming imgur.com/LgpL4Wm
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
Ok, change the IsNull(.To) to IsNull(me.txtTo) assuming your textbox with the emails to send it to is called me.txtTo.
@RK-fp7ob
@RK-fp7ob 7 жыл бұрын
SOLVED (changed registry key values) This is the code i use to open outlook application and send a email for that current viewed customer. It works fine but the only problem i have is that it opens outlook behind my access application and it only comes foreward when i click on outlook. i`ve tried different things with ".Display" / tried "OLApp.ActiveWindow.Activate", but it doesnt seem to work. What can i do ??? ------------------------------------------------------------------- Sub Sendemail() Dim oOutlook As Outlook.Application Dim oEmailitem As mailitem On Error Resume Next Err.Clear Set oOutlook = GetObject(, "Outlook.application") If Err.Number 0 Then Set oOutlook = New Outlook.Application End If Set oEmailitem = oOutlook.createitem(olMailitem) With oEmailitem .To = [Emailadress] .Display End With Set oEmailitem = Nothing Set oOutlook = Nothing -------------------------------------------------------------------- Private Sub Knop427_Click() Call Sendemail End Sub
@migueljrenriquez4573
@migueljrenriquez4573 8 жыл бұрын
Hi sir, what if i want to assign some of field on the body of the email, then how can i do it? Thanks
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
+Migueljr Enriquez I'm not really sure what you're asking.
@funkyfont
@funkyfont 8 жыл бұрын
Hi, what if the end users have different versions of Office. Let's say 2010, 2013 and 2016. Thanks
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
Then you will want to use late binding.
@asharshehzad
@asharshehzad 8 жыл бұрын
very good thank you very much but please if posible then also paste codes for us
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
The code is in the work files. There's a link in the description.
@asharshehzad
@asharshehzad 8 жыл бұрын
+Programming thank you welldone plz also guide about php and html plz
@sajjadahmad6436
@sajjadahmad6436 5 жыл бұрын
Sir how to send Sms to Students Parents By Mbile ???
@simplestsofthazlosencillo3078
@simplestsofthazlosencillo3078 4 жыл бұрын
I mean, how can I send an access report attachment with this code ?
Send Email Using CDO in Microsoft Access Instead of DoCmd.SendObject and Outlook
18:48
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
Send serial email with Access, VBA and Outlook
20:43
codekabinett.com/en
Рет қаралды 33 М.
Send Multiple Emails From Excel
10:09
Excel Macro Mania
Рет қаралды 91 М.
Send Email from Access ~ DataPig
13:39
LearnAccessByCrystal
Рет қаралды 1,2 М.
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН