[AccessD] Outlook's annoying habits

Bob Gajewski bob at renaissancesiding.com
Tue Apr 29 11:55:58 CDT 2003


John

The code below is to *force* a confirmation ... perhaps you could reverse 
the concept somehow?

=======================================================

This Outlook 2000 VBA code sample looks for attached files in outgoing 
messages. For messages with attached files, it prompts the user to confirm 
that the item should be sent and cancels the sending process if the user 
answers No. Place this code in the ThisOutlookSession module.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim intRes As Integer
Dim strMsg As String
If Item.Attachments.Count > 0 Then
strMsg = "Your " & Chr(34) & Item.Subject & Chr(34) & " message to " & _
Item.Recipients.Count & " recipient(s) including " & _
Item.Recipients.Item(1).Name & _
" contains at least one attachment. " & vbCrLf & vbCrLf & _
"Do you want to send this message?"
intRes = MsgBox(strMsg, vbYesNo + vbExclamation, "Confirm File Send")
If intRes = vbNo Then
' cancel send
Cancel = True
End If
End If
End Sub
=======================================================

An interesting side note from MS themselves:

Q262634
Information at the Top of the E-mail Message Does Not Display the File Name
After you attach an "unsafe" attachment to an e-mail message, you can 
change the properties of the attachment before you send it. This changes 
the file name that is displayed in the e-mail message, although it does not 
actually rename the attachment itself. When another user receives the item, 
the attachment is not available. However, the information message at the 
top of the e-mail message does not display the attachment's real file name; 
it displays the name of the file as it was set by the sender.
=======================================================

Regards,
Bob Gajewski



On Tuesday, April 29, 2003 12:29 PM, Myke Myers 
[SMTP:mmmtbig at bellsouth.net] wrote:
> There's a registry hack for the fixing this. I know it works for the
> Outlook working with Exchange server, but whether I don't know if it
> applies to Internet Outlook
>
> The corporate support person who applied it to my customer's PC didn't
> give me the details
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> davesharpe2 at cox.net
> Sent: Tuesday, April 29, 2003 11:01 AM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Outlook's annoying habits
>
>
> ----- Original Message -----
> From: John W. Colby
> To: AccessD
> Sent: Monday, April 28, 2003 8:43 AM
> Subject: [AccessD] Outlook's annoying habits
>
>
> I have a database that needs to send emails every day with attached
> docs. With all SPs applied, Outlook insists on stopping the process and
> forcing the user to confirm the send.  Is there any way to turn off this
> annoying process?
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>
> *******************************************************
>
> John - I'm not sure of the significance of "With all SPs applied"
>
> I'm Office2000 not sure of SP level. I use the following
> ( I found the basic format somewhere, sometime ago ). It
> works for me without any prompting, I hope that It might
> help you
>
> Dave
>
> ********************************************************
>
>
> Function Send_To_Them(TheFile As String)
>
> Dim CheckOutlook As Boolean
> DoCmd.Hourglass True
>
>
> Dim The_Subj As String
> The_Subj = "Here is the weekly VINA data"
>
> Dim B_B As String
> B_B = "Folks, attached is the VINA current as of moments ago." & vbCrLf
> & vbCrLf
>
> B_B = B_B & vbCrLf
> B_B = B_B & "Dave Sharpe" & vbCrLf
>
>
>  Dim objOutlook As Outlook.Application
>  Dim objOutlookMsg As Outlook.MailItem
>  Dim objOutlookRecip As Outlook.Recipient
>  Dim objOutlookAttach As Outlook.Attachment
>
>  ' Create the Outlook session
>  Set objOutlook = CreateObject("Outlook.Application")
>
>  ' Create the message
>  Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
>
>  With objOutlookMsg
>      ' Add the To recipient(s) to the message
>     Set objOutlookRecip = .Recipients.Add("_vina_real")
>     objOutlookRecip.Type = olTo
>
>     ' Add the BCC recipient(s) to the message
>      Set objOutlookRecip = .Recipients.Add("_mee")
>      objOutlookRecip.Type = olBCC
>
>     ' Set the Subject, Body, and Importance of the message
>     .Subject = The_Subj
>     .Body = B_B
>     .Importance = olImportanceHigh  'High importance
>
>     ' Add attachments to the message
>     If Not IsMissing(TheFile) Then
>         Set objOutlookAttach = .Attachments.Add(TheFile)
>     End If
>
>     ' Resolve each Recipient's name
>     For Each objOutlookRecip In .Recipients
>         objOutlookRecip.Resolve
>     Next
>
>     ' Should we look at the message in Outlook before sending?
>     If CheckOutlook Then
>         .Display
>     Else
>         .Save
>         .Send
>     End If
>  End With
>  Set objOutlook = Nothing
>  DoCmd.Hourglass False
> End Function
>
> '=======================================================================
> =
> '=======================================================================
> =
>
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



More information about the AccessD mailing list