Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Be sure the SMTP server is correct
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Koulla" wrote in message ... I put also the comments and now the error is "Cannot Connect to the Server " "Koulla" wrote: Hi I just try it but the following error appers Send using configuration value is invalid Any help here ?? Thanks "Mike H" wrote: Hi, This may work for you http://www.rondebruin.nl/cdo.htm Mike "Koulla" wrote: Hi I am trying to send email with Microsoft Outlook from Excel using VBA code!! Here is my code and is working Perfect With Application .EnableEvents = False .ScreenUpdating = False End With Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) strbody = "This is a test!" & vbNewLine & _ "Please ignore it" With OutMail .To = "xxxxxxxxx" .CC = "" .BCC = "" .Subject = "Here is Counters Alarm file date " & datevar & " and time " & hourvar & ".XLS" .Body = strbody .Attachments.Add (dirvar & "Counters_" & datevar & "_" & hourvar & ".xls") 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .send End With With Application .EnableEvents = True .ScreenUpdating = True End With Set OutMail = Nothing Set OutApp = Nothing But my problem is that before sending it it needs a user interaction because the following message appears from the Microsoft Office Outlook "A program is trying to automatically send e-mail on your behalf. Do you want to allow this ? If this is unexpected, it may be a virus and you should choose "No" " and the user have to select an option Yes or No. But I dont want this I want the default option to be YES. How can I do this via my code ??? Or is there any option in the Microsoft Office Outlook to do it just once ?? Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can i email an excel spreadsheet from office 2003 to a mac user | New Users to Excel | |||
Excel email attachments print differently for each user, why? | Excel Discussion (Misc queries) | |||
Auto email - With every new entry on my user form | Excel Discussion (Misc queries) | |||
HOw DO I EMAIL AN EXEL MACRO TO ANTOEHR USER? | Excel Discussion (Misc queries) | |||
Excel and web interaction | Excel Discussion (Misc queries) |