Hirdetés

Új hozzászólás Aktív témák

  • kraftxld

    nagyúr

    Ma szükség volt egy olyan megoldásra outlook 2003-ban, hogy a send gomb lenyomása után megkérdezze, hogy cc-zni akarod-e automatikusan egy megadott fiókba (correspondence). Itt van hozzá a VBscript amivel megcsináltam, hátha valakinek kell:

    Private Sub Application_ItemSend(ByVal Item As Object, _
    Cancel As Boolean)
    Dim objRecip As Recipient
    Dim strMsg As String
    Dim res As Integer
    Dim strCc As String
    Dim intRes As Integer
    Dim strMsg2 As String
    On Error Resume Next
    strCc = "cp@pmnz.co.nz"

    strMsg2 = "Do you want to send this message to the correspondence mailbox?"
    intRes = MsgBox(strMsg2, vbYesNo + vbDefaultButton2 + vbMsgBoxSetForeground, "Confirm Send")
    If intRes = vbYes Then
    Set objRecip = Item.Recipients.Add(strCc)
    objRecip.Type = olCC
    If Not objRecip.Resolve Then
    strMsg = "Could not resolve the Bcc recipient. " & _
    "Do you want still to send the message?"
    res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
    "Could Not Resolve Cc Recipient")
    If res = vbNo Then
    Cancel = True
    End If
    End If
    Set objRecip = Nothing


    End If


    End Sub

    | MCSE+M/S, MCITP, VCP6.5-DCV - ''Life can be hard, but Scooter is harder :)'

Új hozzászólás Aktív témák