Hallo,
hmm.. let und set werden in Visual Studio 2017 nicht mehr unterstützt.. Sagt die Fehlerliste...
Mit dem Code:
Public Sub SendPDFviaEmail()
Dim objOutlook As Object
objOutlook = CreateObject("Outlook.Application")
Dim objOutlookMsg As Object
objOutlookMsg = CreateObject("Outlook.MailItem")
Dim objOutlookRecip As Object
objOutlookRecip = CreateObject("Outlook.recipient")
Dim objOutlookAttach As Object
objOutlookAttach = CreateObject("Outlook.Attachment")
With objOutlookMsg
.to = "blalll@kjaslfkj.de"
.Subject = "Blah "
.Body = "blah blah blah"
.Display
End With
objOutlook = Nothing
End Sub
bekomme ich die Fehlermeldung beim Ausführen:
Eine Ausnahme vom Typ "System.Exception" ist in Microsoft.VisualBasic.dll aufgetreten, doch wurde diese im Benutzercode nicht verarbeitet.
Die ActiveX-Komponente kann nicht erstellt werden.
In der Zeile:
objOutlookMsg = CreateObject("Outlook.MailItem")
Viele Grüße
Andreas
|