View Full Version : Automation Warnings...


JaedenRuiner
06-29-2007, 07:44 AM
Okay,

I'm running a VBA back end app for Excel, filling out work based checksheets and stuff, which at the culmination of the current task certain files need to not only be copied to a global location but emailed to a different department in the office. Well, being the lazy bastard I am, I am automating this entire process via a simple user form, instead of not only manually copying the files to start the project, filling out all the forms, and copying them a second time, whatever, I like the automating capabilities of computers so I take advantage of it.

However, even with my automation forms and everything perfectly written, every time I add the two contacts from the corporate address list, I get this damned automation warning from Outlook, which kind of disrupts the process.

NOw, there should be some security protocol, or some sort of code or what not that allows me to develop for my own Excel/Word/Outlook without affecting the global security settings of Outlook. They always talk about "Signed Controls" Well, How the hell do I "sign" my own stuff, so I don't have to reduce the security of Outlook, but allow my stuff to work without complaint.

Thanks

Jaeden "Sifo Dyas" al'Raec Ruiner

Minkey
06-29-2007, 08:07 AM
Can you post the exact error messages and version of Outlook please, though here's something to start with this (http://www.microsoft.com/technet/prodtechnol/office/office2003/deploy/secdesn.mspx). Depending on how Outlook is deployed you may need to contact a network admin I'm afraid.

JaedenRuiner
06-29-2007, 12:31 PM
Can you post the exact error messages and version of Outlook please

I'll do ya one better:
Outlook 2003


Dim myApp As Outlook.Application, _
myItem As MailItem, _

Set myApp = New Outlook.Application
If Assigned(myApp) Then
Set myItem = CreateItem(olMailItem)

If ArrayLength(arFiles) > 0 Then 'ArrayLength is my function
ReDim arDest(3)
For i = 0 To 3
arDest(i) = sDest & arFiles(i)
arFiles(i) = sSource & arFiles(i)
myItem.Attachments.Add arFiles(i)
Next
CopyForm.SourceFiles = arFiles
CopyForm.DestFiles = arDest
CopyForm.Show vbModal 'this form on show use filesystemobject to copyfile and check if dest exists/overwrite, etc.
End If

'I get the error on the next TWO lines
'The dialog image shown below is the exact message I get. Of course
'I can set the time limit to allow it to continue, etc.
'I want to avoid it for this particular case.

myItem.Recipients.Add "Name 1" 'Removed for Privacy
myItem.Recipients.Add "Name 2" 'Removed for Privacy
myItem.Display vbModeless
End If


http://www.wayoftheleaf.net/download/outlookerror.jpg

I usually select allow for 1 minute and it works, but hte very fact it switches to Outlook when it is my code, and i'm intentionally doing this to take advantage of "OLE AUTOMATION" it seems pretty anal retentive to not allow people the ability to "sign" their own controls and what not.

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner

pbaldy
06-29-2007, 12:40 PM
I've used a little utility called ClickYes to get around these. There's also Outlook Redemption and I suspect other ways as well.