Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Virus Protection Workaround??

I am adapting Ron DeBruin's code for sending email to a range of names. It is
reproduced below:

Sub TestFile()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim cell As Range
Dim SigString As String
Dim Signature As String
Dim Assgn As String
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\blah blah.txt"
If Dir(SigString) < "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
Assgn = Range("B1").Value

For Each cell In Range("D6:D100").Cells.SpecialCells(xlCellTypeCons tants)
If cell.Value < "" Then
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = cell.Value & "
.Subject = "Your Grade For " & Assgn
.Body = "Dear " & cell.Offset(0, -2).Value & vbNewLine &
vbNewLine & _
"Please contact us to discuss bringing your account
up to date" & Signature
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'Or use Display
End With
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub

After every email a multi-second window pops up asking if I want to allow
Excel to use Outlook. For 50 emails, this gets old. Is there any way to
induce the "use Outlook for X minutes" option?

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Virus Protection Workaround??

I found Ron's code using CDO configuration. I used his optional configuration
code because the vanilla version wasn't sending.

Now however, when I got to the send command, I received a "couldn't connect
with server". That's prolly because my server requires authentication. Any
code help much appreciated.

"John V" wrote:

I am adapting Ron DeBruin's code for sending email to a range of names. It is
reproduced below:

Sub TestFile()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim cell As Range
Dim SigString As String
Dim Signature As String
Dim Assgn As String
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\blah blah.txt"
If Dir(SigString) < "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
Assgn = Range("B1").Value

For Each cell In Range("D6:D100").Cells.SpecialCells(xlCellTypeCons tants)
If cell.Value < "" Then
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = cell.Value & "
.Subject = "Your Grade For " & Assgn
.Body = "Dear " & cell.Offset(0, -2).Value & vbNewLine &
vbNewLine & _
"Please contact us to discuss bringing your account
up to date" & Signature
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'Or use Display
End With
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub

After every email a multi-second window pops up asking if I want to allow
Excel to use Outlook. For 50 emails, this gets old. Is there any way to
induce the "use Outlook for X minutes" option?

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Virus Protection Workaround??

Hi John

I use Express clickyes v1.2 available here

http://www.contextmagic.com/

This is a utility which automatically performs the yes function for the VBA
security pop up you described in realtion to sending email via Outlook

Good Luck

N10



"John V" wrote in message
...
I am adapting Ron DeBruin's code for sending email to a range of names. It
is
reproduced below:

Sub TestFile()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim cell As Range
Dim SigString As String
Dim Signature As String
Dim Assgn As String
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\blah blah.txt"
If Dir(SigString) < "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
Assgn = Range("B1").Value

For Each cell In
Range("D6:D100").Cells.SpecialCells(xlCellTypeCons tants)
If cell.Value < "" Then
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = cell.Value & "
.Subject = "Your Grade For " & Assgn
.Body = "Dear " & cell.Offset(0, -2).Value & vbNewLine &
vbNewLine & _
"Please contact us to discuss bringing your account
up to date" & Signature
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'Or use Display
End With
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub

After every email a multi-second window pops up asking if I want to allow
Excel to use Outlook. For 50 emails, this gets old. Is there any way to
induce the "use Outlook for X minutes" option?

Many thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a workaround Lyle Miller Excel Worksheet Functions 0 March 31st 10 05:49 PM
csv load 64K workaround r0dr1g0 Excel Worksheet Functions 1 March 7th 05 06:36 PM
macro virus protection LiSa Excel Programming 3 June 9th 04 02:38 PM
auto turn off macro virus protection DEL Excel Programming 3 October 9th 03 01:26 PM
Macro Virus Protection L Buchy Excel Programming 2 July 25th 03 05:36 AM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"