Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Security

Status
Not open for further replies.
Apr 27, 2006
126
GB
OK, I will start by saying that I am NOT asking for a way to use code to disable the outlook "A program is trying to send mail using Item.Send" security issue.

My query is this:

Each day I generate a batch of reports and I have written the relevant VB script in outlook 2k3 to sent them out, it would be nice to be able to walk away from my desk while this is happening (as some of the mails are quite large and my time is wasted sitting by my PC eagerly waiting to click "YES"). I only wish to disable it on the local PC, especially as on this machine internal mail only is available.

I know this is a little sketchy if this equates to a VBA question, but, as the error occurred to to VBA programming, hopefully someone else has found a way of disabling it from within outlook. (no 3rd party software please)

Incidentally, I wrote a script in msword which uses sendkeys, 2 TAB's and a SPACE or ENTER... it tabs along to "Yes" fine, but will not hit space or enter on the button.. infuriating!!!

Someone help me, pretty please

(thanks in advance)

clueless
 
thanks.. and crap.. no way of doing it w/out 3rd party software :(

clueless
 
incase anyone has their email server ip and wishes to bypass this, the code is as follows

Code:
Sub SendEmail()

    Dim Content As String

Content = ""

    Dim iMsg As Object

    Dim iConf As Object

    Dim SMTPServerIP As String

    Set iMsg = CreateObject("CDO.Message")

    Set iConf = CreateObject("CDO.Configuration")


    SMTPServerIP = "192.168.5.9"

 

        iConf.Load -1    ' CDO Source Defaults

        Set Flds = iConf.Fields

        With Flds

            .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2

            .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = SMTPServerIP

            .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] = 25

            .Update

        End With

 

    With iMsg

        Set .Configuration = iConf

        .To = ""

        .CC = ""

        .BCC = ""

        .From = ""

        .Subject = ""

        .TextBody = Content

        .AddAttachment ""

        .Send

    End With

 

    Set iMsg = Nothing

    Set iConf = Nothing

 

End Sub

clueless
 
shavenlunatic

....
MyMailItem.Display
SendKeys "%s"
....


works for me for this nice-to-have agly-that-exist protection!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top