lotus in plaats van Outlook

Status
Niet open voor verdere reacties.

vantuijl1980

Gebruiker
Lid geworden
18 nov 2013
Berichten
18
goedendag

ik heb deze vba voor automatisch opslaan en versturen als pdf bestand via outlook maar op mijn werk gebruiken lotus notes als mail programma
hoe moet vba dan zijn.
PHP:
Sub MailWerkboek()
    Dim TempFilePath As String
    Dim TempFileName As String
    Dim TempFileTime As String
    Dim OutApp As Object
    Dim OutMail As Object

    frmInfo.Show vbModeless

    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With

    TempFilePath = ThisWorkbook.Path & "\"
    TempFileTime = Format(Now, "dd-mmm-yy h-mm-ss")
    TempFileName = "Ritten " & TempFileTime

    ActiveWorkbook.Save
    Application.DisplayAlerts = False
    ActiveWorkbook.SaveCopyAs Filename:=TempFilePath & TempFileName & ".xlsm"
    
    Sheets(" totaal").ExportAsFixedFormat _
        Type:=xlTypePDF, _
        Filename:=TempFilePath & TempFileName & ".pdf", _
        Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, _
        IgnorePrintAreas:=False, _
        OpenAfterPublish:=False
    
    Application.DisplayAlerts = True
    
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next
    With OutMail
        .to = "vantuijl1980@gmail.com"
        .CC = ""
        .BCC = ""
        .Subject = "Dag Rapportage " & TempFileTime
        .Body = ""
        .Attachments.Add TempFilePath & TempFileName & ".pdf"
        .Send
        .Display
    End With
    On Error GoTo 0

    Kill TempFilePath & TempFileName & ".pdf"
    frmInfo.Hide

    Set OutMail = Nothing
    Set OutApp = Nothing

    With Application
        .ScreenUpdating = True
        .EnableEvents = True
    End With
End Sub

Mvg

Albert
 
Status
Niet open voor verdere reacties.
Steun Ons

Nieuwste berichten

Terug
Bovenaan Onderaan