We are using XCL 2002. My macro file is stored on a shared drive an
folder. The macro is digitally signed, by me, and each of the user
has accepted and stored on his/her computer the appropriate digita
certificate. The main procedure is named 'Auto_Open'; this i
triggered by a Windows XP Pro 'Scheduled Task' for each user.
My objective is for each user to view zero pop-ups when the Schedule
Task is processing. I have 'pretty much' accomplished this via use o
'Application.Visible = False' at the beginning of my code (and NO
using 'Application.Visible = True' anywhere in my code).
I have two questions:
- I want to eliminate the Outlook pop-up that occurs when th
olMail.Display stmt (see my e-mail code below) is processed. I thin
that I can do this by inserting 'Application.Visible = F/T' a
indicated below. Do you agree?
- When the code runs on my machine, the e-mail is sent without an
need to click on 'Send' above the e-mail message. All of the users ar
experiencing a need to click on 'Send' for the macro to clear and fo
Excel to shut down. I have compared Outlook settings, especially re
sending e-mails, between my machine and corresponding settings fo
users -- I cannot find any significant differences. Users ar
complaining about this. Any ideas?
Sub EMAIL()
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
Set MyObject = Excel.Application
myPath = “S:\Investments\”
If fName < myPath & “BLANK” Then ‘Fund has an Adjustment
With olMail
.To = “Group”
.Subject = “MACRO-GENERATED E-MAIL”
.Body = “There is an Adjustment $10,000; “ & _
“see Attached File.” & vbCrLf & vbCrLf & vbCrLf
.Attachments.Add fName
End With
<<<<<<<<<<<<<<<<<<< Insert 'Application.Visible
False'
olMail.Display
‘Send “Alt-S” to OUTLOOK App
Application.SendKeys “%S”, True
<<<<<<<<<<<<<<<<<<< Insert 'Application.Visible
True' ???
‘Release Memory
Set olMail = Nothing
Set olApp = Nothing
Else ‘This means n
Adjustments
Call Elsewhere
End If
Application.Visible = True
Application.Quit
End
End Sub
TIA for a reply,
Chuckles12
--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile:
http://www.excelforum.com/member.php...fo&userid=1494
View this thread:
http://www.excelforum.com/showthread.php?threadid=38832