Excel Sending Email via VBA - Suppressing the Warnings
Hello everybody,
I would be very appreciative if someone more knowledgeable than would help me out. I am building a VBA code in Excel that will send an Excel File as an attachment in an email to somebody using Outlook. I can get everything to work just fine except that a
warning message pops up and it is quite irritation and negates the usefulness of the macro if I have to constantly click on [Allow].
Any help with how to suppress the warning messages would be greatly appreciated!
Note: My company's IT will not let me download add-ins or programs not on their "safe" list.
Also, I have included the important parts of my code below.
Thanks!
Eric
Sub Email_Finance()
Dim oApp As Object
Dim oMail As Object
Dim WB As Workbook
Dim FileName As String
Dim wSht As Worksheet
Dim shtName As String
Dim wsTab As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
' The section below goes to Outlook to create an email, fill in some details, and then emails it out.
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.CreateItem(0)
With oMail
' Uncomment the line below to hard code a recipient
.To = "[email protected]"
.Cc = "[email protected]"
' Uncomment the line below to hard code a subject
.Subject = "G&A Monthly Report - Finance"
' Uncomment the lines below to hard code a body
.body = "Dear Eric," & vbCrLf & vbCrLf & _
"Please find attached the G&A report for this month. Please review and adjust accordingly. " & vbCrLf & vbCrLf & _
"Thanks, Eric"
.Attachments.Add WB.FullName
.Display
.Send
End With
See http://www.outlookcode.com/article.aspx?id=52 for the list of your options.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.5 is now available!
Similar Messages
-
Sending email via Gmail causes the file to be stored in two Sent folders
Hi there,
I've just set up Mac Mail to synchronise my Gmail account via IMAP and all is well except: when I send an email it appears in the "Sent" folder of my regular account AND the "Sent" folder of Gmail. How can this be? When I send the email, it is sent using my Gmail address, so I would have thought that the message would have been routed just to my Gmail sent folder... not to my regular sent folder as well.
Thoughts?
Cheers,
-CI'm having the same problem on a home PC running Windows 7 64-bit SP1 and Office 2010 but I'm not running Norton. Started with one of dozen or so .PST files I have for various accounts. The first "...the file so that..." folder has no properties
and I couldn't delete it. Subsequent "...the file so that..." (those with .1 and .2, etc) I could delete. Thought I had the problem solved by simply creating a new .PST file and moving all my mail from the affected. PST file and closing the affected
one. That worked for a couple of days but I notice this morning I have the same thing in a completely different .PST file.
Again, I don't use Norton and have been using the same add-ins for quite some time but this just started in the last couple of weeks.
DaleM -
I can no longer receive or send email via my Yahoo account from my iphone6. I've downloaded several "help guides" from the internet, deleted and re-added the account via imap settings. Nothing seems to work. Any ideas?
Use the yahoo app if available?
-
How to send ALV output data into Excel sheet format via Mail to the user?
Hi friends,
I have a doubt ie,
How to send ALV output data into Excel sheet format via Mail to the user?
regards
MoosaHi,
Provide the output internal table to the objbin in the below FM
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_docdata
put_in_outbox = c_x
TABLES
packing_list = i_objpack
object_header = i_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
and specify the document type
i_objpack-doc_type = 'XLS'.
and try.
Regards,
Nandha -
I have an Apple Ipad. I was having problems receiving and sending emails via my yahoo email account. I deleted the account and then tried to install it but it won't connect to server. Could you let me know what I do please?
I think you have to turn off Private Browsing.
Tap "Private" on Safari Screen to disable Private Browsing. When top of screen is white, Private Browsing is off.
http://i1224.photobucket.com/albums/ee374/Diavonex/547958b4a8c01ac084dd6649e8386 a0f_zps12fa0cca.jpg -
On my 90 day old MacBook Pro I can't send or receive (Mobile Me) email via "Mail." The fetch icon keeps spinning. Any help would be greatly appreciated. I'm able to receive Mobile Me emails on my iphone or via the web, but just not on the laptop. I'm only one day past the free Apple care:(
Thanks!glippert wrote:
Tkx, tjk...I tried calling Apple Care and they directed me to the forums...
I guess that's their right at one second past midnight on the 91st day.
Here's the link to the MobileMe support forums; I'd post there:
https://discussions.apple.com/community/mobileme -
I am new on the iPod 5th Gen, I have managed setting up ok, I can send emails via Mail but cannot seem to receive them ? help what am I doing wrong
Try this...
Delete the affected email account from your device.
Tap Settings > Mail, Contacts, Calendars.
Choose the affected email account, then tap Delete Account.
Add your account again. -
Cannot send email via Hotmail through port 587 with Secure Connection (SSL) set
Something is blocking my attempts to send email (with Outlook Express) via my hotmail.com account. The error I receive is as follows:
Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: 'Hotmail', Server: 'smtp.live.com', Protocol: SMTP, Port: 587, Secure(SSL): Yes, Error Number: 0x800CCC0F
When Hotmail.com first changed over to a POP3 server (Sept 2009), I could send emails through them using port 587, which they require. But then something happened, with no changes on my part, to disable my ability to send.
I have checked and rechecked my Outlook Express account settings. I can send email through another third-party mail account (at 1&1 Internet.com) using port 587, which does not require setting SSL to yes. I can also ping the Hotmail SMTP server via port 587 and receive a response from it.
I connect to Verizon DSL via a Westell 327W modem/router. Clearly it is not blocking port 587 without SSL. Does it have the capability to block SSL traffic? Or is the Verizon server the culprit, not allowing emails to be sent via Hotmail.com?
Two different computers on my LAN have the same problem sending emails via Hotmail.com. I have tried everything the Hotmail people have suggested; at this point they think it is an ISP problem, hence this post. This problem doesn't make sense to me and is driving me crazy. Can anyone help me with this?
Thanks.You can still have your reply address set to your hotmail address. And you don't have to really remember to do anything. Configure your client for the HOTMAIL account with Verizon's outgoing server. It will automatically send via Verizon. You don't reveal your verizon.net address, you are just using their server to transmit.
If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
"All knowledge is worth having." -
Have just installed ios8 on our iPad. Can no longer send emails via Hotmail. BT email says that if can't work on this device.
When will these faults be fixed?does it error out or does it just not go through?
have you tried to delete and then re-add your hotmail address? Using the outlook preset -
Since the upgrade to Mountain Lion (OSX 10.8) I have noit been able to send email via Apple Mail through the O2 network in the UK. O2 say they are aware of this but that it is something that Apple need to address via a patch.
Following a 45 minute call to O2 yesterday I've just had a further conversation with O2 who advised me to change my 'port setting' to 25. Mail now works fine! Panic over.
-
I can't send emails via mail. I can receive but not send. I have set up gmail on mail. Any ideas? No problems with the set up previously to this.
Go to Mail Preferences- Accounts and confirm you are providing Gmail what they require to send and receive mail. And DON'T specify Secure Socket Layer. Some mail accts don't like SSL
Good Luck to you. -
Gmail taking ages to send email via mail app
I bought a MacBook air yesterday and set up my gmail account on the mail app. Everything seemed to be working okay at first but now it's takkng at least five minutes to send a plain text email, one email I tried sending last night didn't send until this morning! I tried changing the SSL port to 25, 465 and 587 not only do they not work but then it stops my mail from moving into the folders or trash, they move and then go back to my inbox.
Please help!Stephen Schulte2 wrote:
When I am in a hotel out of town or overseas- or just anywhere where I don't have my home ISP - how can I not only RECEIVE but also SEND eMail via my Mail program?
If your ISP is like mine, it authenticates you for outgoing e-mail by being able to determine that you're accessing the Internet from within their network. If your ISP is so configured, they'll offer the ability to authenticate to their SMTP server with a password. My ISP does not.
However, MobileMe does provide its own authenticating SMTP server that you should be able to use from anywhere. Try an SMTP server of smtp.mac.com (smtp.me.com will probably also work) with settings of "Use default ports", "Use Secure Sockets Layer (SSL)", and "Authentication" by password, your "User Name" the part of your MobileMe ID before the "at" sign, and your password your MobileMe password.
For non-MobileMe outgoing e-mail, you'll need to locate an SMTP server that you can use.
Also: Anyway to attach more than 1 file (say photo) at a time using MobileMe and my mail account? For 22 small photos do I have to hit attach each time? I can't seem to select the folder they are in and get all 22 to attach...
I haven't tried that, but I would expect to have to attach them one at a time. -
Unable to send emails via Nokia Messaging
I have had the device for about 3 months and I have never had problems sending emails before, however over the last 3 days when I try and send an email it just sits in my outbox and then after a while it says failed.
I receive emails fine so this is baffling me.
I've noticed a similar problem was addressed however that is specific to getting an error 500 message and I don't get that. I tried the work through anyway but it still didn't solve the issue.
Any help will be very much appreciated.
Thanks
LRchicaman wrote:
have u fixed ur phone? Can u try uploading pictures via facebook plugin too? I think i got the same problem as u!
hey man i have the same problem, i can't upload pictures on facebook for some reason, but it works perfectly on other wifis .
and i remember having the same problem with my nokia messaging, here is what i did to fix it : delete the account from your phone, than go to emal.nokia.com, delete than radd your email accounts, than readd your nokia messaging account on your phones .
Reality is wrong....dreams are for real... 2pac .
don't forget to hit that green kudos -
Cannot receive/send emails via Mail on Mac using 10.6.8, keeps asking for password, very frustrating. Any ideas please? Regards
One more time, iCloud mail accounts are .me, .mac and .icloud. New ones are only .icloud.
iCloud mail is a standard Imap account that can be used with any mail client in existence. But You are talking about the ability to automatically setup an iCloud account in mail, which did not exist until 10.7.2.
You can use password or token authentification with iCloud mail (in Mail) it is your choice.
Set the account manually, set it as Imap, use imap.mail.me.com (no P number) for the incoming email and smtp.mail.me.com as the outgoing server.
The full settings (ports and security) are here. Use them and it will work, regardless of domain (mac, me and icloud addresses all use the same settings.
IMAP (Incoming Mail Server) information:
Server name: imap.mail.me.com
SSL Required: Yes
Port: 993
Username: [email protected] (use your @me.com address from your iCloud account)
Password: Your iCloud password
SMTP (outgoing mail server) information:
Server name: smtp.mail.me.com
SSL Required: Yes
Port: 587
SMTP Authentication Required: Yes
Username: [email protected] (use your @me.com address from your iCloud account)
Password: Your iCloud password
Note: If you receive errors using SSL, try using TLS instead. SSL is required for both IMAP and SMTP connection with iCloud. POP is not supported by iCloud.
For more information on how to use this information with your email application, consult your application's documentation. -
I have at&t internet and cannot send using my at&t email. I can send via gmail. Or if I go use someone elses internet, not being at&t, I can send. At&t said it is a mac issue. I told them it is their issue with macs since I can send using other providers.
Anyone know of a fix?Does not help.. my problem is a little different
I have an iMac and I cannot send emails via outlook 2011. I have 3 emails stuck in the sent box... They are not in my sent or inbox. Every time I send an email it first tries to send these 3 mails. for 2 I get an error code 3210 and for one "5.1.2 or other punctuation after the recipient's email address. g5sm23942864eem.4". I have an euronet account and not a hotmail account.
Maybe you are looking for
-
Has anyone posted podcasts on the OWI portal? What methodology was used?
-
Hi Team, Can you please provide me the table names where i can see the quantity against the batches in the goods movement? I checked with MCHB but i couldn't get the details for all the goods movement. This particular table is updating only when the
-
Hello all, My requirement is to process invoice output and create an idoc file in the destination idoc folder. When I am processing the output it is creating an idoc of type INVOIC type INVOIC02 with status 03. But the middleware team is not able to
-
Hello everyone! I am newbie to LabVIEW with some previous experience programming in different languages. My goal is to build the application that upon my selection needs to give specific values from previously filled and prepared file. For example, I
-
Java.lang.StackOverflowError problem, drawing images in applet :(
* Paints the applet @Override public void paint(Graphics g) if(running && levelOne) g.setColor(Color.MAGENTA); g.drawString("HP Left: " + player.getHP(), 100, 10); // g.drawString("Time Left: " + timer.getTim