@@automatedata5412 Your way of explaining is superb. This video very useful. But a suggestion kindly add the link in the description for finding the VBA code to copy paste. It will be more easier for us
@@TritonConsultancy-iz1gf to be really honest why most of the tutorial wont have the code is because then people will just copy paste it and not watch the video. When I put the video like this viewers will have to sit through the entire video to get the complete code. I know it is cruel but thats the only way I can get benefitted from this video😭
Hello! Is there a way to change the default sender with this code. As is, it will choose the default sender in the Outlook application for the user who runs the code. What if I want to send form one of my other email addresses? Thanks for the good work here.
Yes that is absolutely possible. Without code the way is to go to outlook and change the default sender. Then run this code.. (u can try some test values first to make sure it is working )
This is exactly what I was looking for in regards to adding Cc fields to my mail merge. However, I need this to work with a word template with a picture within the email. Can you help adjust?
Thankyou.. Unfortunately i do not have the file with me now. But I suggest you use some image to text extension or take a screenshot of the code and use some image to text site for now
Hello! Thank you for the video! I was not able to get the code to work. It stops here msg.attachments.Add.ws.Range ("E" & i) Any ideas of the possible issue? Thanks again!
Yes you can. If VBA there is an option to use a line of code to make the application wait for certain amount of time until running the next line. So if u place that code line before the for loop ending, it will work. If you need that line of code, please refer to my video of a macro to not let your computer sleep when not in use. In that video I have used the time delaying method.
If you dont want to preview then instead of .display use .send For default signature please refer to some utube videos on how to add default signature on outlook (its easy no coding required).. and try first with some sample data to test if its working
Very Nicely Explained. Can you please explain the part of code where you have put condition if attachment path is not available in excel. Also if i need to add one more column to change signature; what should be the code. Will this Code works if i want to use on behalf email id.
Hi Santosh, In this code column F contains the attachment details. Here the if conditions states that if column F cell value is not blank .. means not equal to. So "" means not blank. So if that cell is not blank the macro will consider the value in that cell as the attachment path.
Runtime error 440, Cannot add the attachment; no data source was provided, Have already checked the path and extension in the sheet it complete with root directort still the same error is appearing, Any solution?
Yes it is possible.. use (.send) instead of (.display) it will send automatically For the interval ass a line of code before ending the for loop which will make the system wait for certain time (please search google for this application.wait ..something is the syntax)
@@automatedata5412 sorry what I meant was is there a way to pull the name from a column and attach to the body so that I do not need to update my body content on each message to include the person name?
@@terry9914 yes. Put another column and in that column add a formula like: = "Hi " & A2 & ", " & B2 Assuming column A has names and b has message. Fill the formula till end
I didnt understand the issue.Did u mean the last row mail is not being sent. Then try this.. after the line where u declare last row write one more line after it Lastrow = lastrow + 1 Try this and let me know
I've got it working, but I can't attach attachments in Outlook. Like in excel i have attached the document and the code is running fine but in outlook there is no attachment.
Yes , use comma seperator or semi colon seperator. One of this should work Example: “fake@gmail.com;fake2@gmail.com” I dont remember exactly whether we should use , or ; Try each of them
Hello can you please show how to insert file path? As i am getting error code 440: cannot add attachments no data source but i have the file path in my spreadsheet 😢
th-cam.com/video/G4qyzclix10/w-d-xo.html refer to videos like this. U need to get the file path like this and paste it in excel. Sometimes u will have many number of files. Make sure u have the extension mentioned as well. For eg=.Pdf or .Jpg
People, I have fixed the error 440, Cannot add the attachment; in the "msg.attachments.Add.ws.Range("F" & i).Value" you should update the sentence to this: msg.attachments.Add ws.Range("F" & i).Value
hellow sir, I can not run this. ERROR CODE 440 can not add the attachments. No data source was provided. I have provided the path of respective files. Pls advice
In the attachment path give the file path Example : c:/users/documents/myfolder/myexcelfile.xlsx Here check what file type u have it can me probably xlsx or xlsm
@automatedata5412 The recipient has to have access to the file folder in order to open the file. So if the person does not have access to the folder where the excel file is located, how do i attach the excel file then?
Hi, instead of excel we can use Google Sheets. It is much easier than outlook. If you need us to develop a code for you, you can contact us at automatedata2022@gmail.com
Brother you are legend please keep going like this way. You are fantastic
This video very useful to me ,thank you very much 1 hour work I did in 15 mins thank you
Thankyou for the kind words
@@automatedata5412 Your way of explaining is superb. This video very useful.
But a suggestion kindly add the link in the description for finding the VBA code to copy paste. It will be more easier for us
@@TritonConsultancy-iz1gf to be really honest why most of the tutorial wont have the code is because then people will just copy paste it and not watch the video. When I put the video like this viewers will have to sit through the entire video to get the complete code. I know it is cruel but thats the only way I can get benefitted from this video😭
Very clear and detailed explanation, thank you very much, could you please tell if can we use the same code for dynamic data?
Thankyou. By dynamic did you mean the number of rows? Then this code is already fit for that.😁
Hello! Is there a way to change the default sender with this code. As is, it will choose the default sender in the Outlook application for the user who runs the code. What if I want to send form one of my other email addresses? Thanks for the good work here.
Yes that is absolutely possible. Without code the way is to go to outlook and change the default sender. Then run this code.. (u can try some test values first to make sure it is working )
This is exactly what I was looking for in regards to adding Cc fields to my mail merge. However, I need this to work with a word template with a picture within the email.
Can you help adjust?
Hey if you are looking for a word template mail. You should check out mail merging in ms word. There you can use CC also. And no code required.
@@automatedata5412 Thank you for responding. But I have a huge excel list with custom messages and codes. Each email for To and Cc are different.
@@mowgli536 yes you can use mail merge for that. Custom subject cc to body everything
@@automatedata5412hi have same issue with mail merge with custom subject and CC I am unable to send with custom subject and CC
Very nice information, it would be great help if you could attach the codes herewith.
Thankyou.. Unfortunately i do not have the file with me now. But I suggest you use some image to text extension or take a screenshot of the code and use some image to text site for now
Yes bro
Hello! Thank you for the video! I was not able to get the code to work. It stops here
msg.attachments.Add.ws.Range ("E" & i)
Any ideas of the possible issue?
Thanks again!
Thanks it's working..
But can I set time 30 second and after send second mail
Yes you can. If VBA there is an option to use a line of code to make the application wait for certain amount of time until running the next line. So if u place that code line before the for loop ending, it will work.
If you need that line of code, please refer to my video of a macro to not let your computer sleep when not in use. In that video I have used the time delaying method.
Hi, I am getting error as runtime error 440 but I have already put the correct pathname with filename. Still getting this error please advise...
Hello,
I have one doubt that when I run this it works but whatever formatting for email Body I did in Excel sheet was not showing
hi, how to add default signature on outlook to send multiple email with signature ? without preview first with code msg.display
If you dont want to preview then instead of .display use .send
For default signature please refer to some utube videos on how to add default signature on outlook (its easy no coding required).. and try first with some sample data to test if its working
Very Nicely Explained. Can you please explain the part of code where you have put condition if attachment path is not available in excel.
Also if i need to add one more column to change signature; what should be the code.
Will this Code works if i want to use on behalf email id.
Hi Santosh,
In this code column F contains the attachment details. Here the if conditions states that if column F cell value is not blank .. means not equal to.
So "" means not blank.
So if that cell is not blank the macro will consider the value in that cell as the attachment path.
Please help. I tried the code but I encountered an error - "Run time error '429'. Active X component can't create object"
Do you use an old version of excel?
@@automatedata5412 MS Excel Ver 16
@@automatedata5412 I used Version 16 in Mac
Same problem ! Any solution please. I am using new version
Runtime error 440, Cannot add the attachment; no data source was provided,
Have already checked the path and extension in the sheet it complete with root directort still the same error is appearing, Any solution?
Debug is highlighting error in the code
msg.attachment.Add.ws.Range ("L" & I).Value
is it possible that outlook sends the email itself but instead of sending multiple emails at the same time, it sends at an interval of 5-10 minutes?
Yes it is possible.. use (.send) instead of (.display) it will send automatically
For the interval ass a line of code before ending the for loop which will make the system wait for certain time (please search google for this application.wait ..something is the syntax)
Great video, one question, how do I go about personalizing the body of each
email with the person's name?
In this video, column E is labelled as message. That is the body part. You can enter your customised body content there
@@automatedata5412 sorry what I meant was is there a way to pull the name from a column and attach to the body so that I do not need to update my body content on each message to include the person name?
@@terry9914 yes. Put another column and in that column add a formula like:
= "Hi " & A2 & ", " & B2
Assuming column A has names and b has message. Fill the formula till end
Not getting the mail pop up when using msg.display , I want to send mails from different mail Id Rather than default mail Id
Also please help i want send mail while keeping customers only in BCC and rest TO & CC will be blank, Could you please assist
I tested this code, everything is working fine except the last row and column is not automated( not sending email automatically). What should i do?
I didnt understand the issue.Did u mean the last row mail is not being sent. Then try this.. after the line where u declare last row write one more line after it
Lastrow = lastrow + 1
Try this and let me know
I've got it working, but I can't attach attachments in Outlook. Like in excel i have attached the document and the code is running fine but in outlook there is no attachment.
I’m expecting a reply
@@manishprasad2390 can you type here the attachment details.. just one would be enough as an example
C:\Users\js903f\Desktop\work tracker.xlsx
Script not running shows error " End if without block If"
Please help here.
How can I supress the Outlook warning while sending mail using macro in excel
Application.displayevents = false
'''Mail part of code here'''
Application.displayevents = true
how can i add a signature with title, website, X... on the body email
Include that in the body part of the mail.. or try setting up a default signature in ur outlook
I see that Runtime error ‘9’. subcript out of range error message popping up
@@somom1100 subscript out of range cones usually when the sheet name is wrong
Can we add multiple adress in to adress?
Yes , use comma seperator or semi colon seperator. One of this should work
Example: “fake@gmail.com;fake2@gmail.com”
I dont remember exactly whether we should use , or ;
Try each of them
Hello can you please show how to insert file path? As i am getting error code 440: cannot add attachments no data source but i have the file path in my spreadsheet 😢
Same here
th-cam.com/video/G4qyzclix10/w-d-xo.html refer to videos like this. U need to get the file path like this and paste it in excel. Sometimes u will have many number of files. Make sure u have the extension mentioned as well. For eg=.Pdf or .Jpg
it give that can not add attachement no data source provided
Yes u need to provide the attachment path in the column i mentioned in the video. U can add like folder/folder/myfile.pdf
People, I have fixed the error 440, Cannot add the attachment; in the "msg.attachments.Add.ws.Range("F" & i).Value" you should update the sentence to this: msg.attachments.Add ws.Range("F" & i).Value
Thankyou for this.. This might help many
Great that is what I am looking
Resolved issue.
Now its working
hellow sir, I can not run this. ERROR CODE 440 can not add the attachments. No data source was provided. I have provided the path of respective files. Pls advice
Path is not enough. U should end the path with specifying the file extenison. For example: path/foldername/filename.Pdf
How do I add an excel file as an attachment?
In the attachment path give the file path
Example : c:/users/documents/myfolder/myexcelfile.xlsx
Here check what file type u have it can me probably xlsx or xlsm
@automatedata5412 The recipient has to have access to the file folder in order to open the file.
So if the person does not have access to the folder where the excel file is located, how do i attach the excel file then?
@@jessbel196 recipient doesnt need access to the location since we are attaching it as a file and not the location
@automatedata5412 Getting an compile error Next without for
@@jessbel196 please check the code if you have used “for”
Gmail pe bulk me kaise send kare mail jisme CC me bhi e-mail kar ske
Hi, instead of excel we can use Google Sheets. It is much easier than outlook. If you need us to develop a code for you, you can contact us at automatedata2022@gmail.com
Salve come faccio a mettere il percorso mi dà errore 440
You need to put path like folder/filename.pdf
That extension is required. U can put pdf or jpg or whichever extension u have
@@automatedata5412 pdf
@@GiuseppeTramonta-wj7mn then put in the column that specifies the file name, put extension as well. Example --> c:/folder/filename.pdf
I have put the extension as well but its not working
There might be issues with the references