Hallo zusammen,
ich kämpfe gerade mit der OutlookEX UDF.
Ich möchte momentan einfach nur dieses Beispiel testen.
Code
$oOutlook = _OL_Open()
; *****************************************************************************
; Example 4
; Create a html mail plus two attachments (plus one inline picture = attachment)
; but don't send it
; *****************************************************************************
; Create the item without setting the body. We first need to add the picture before we can refer to in by the HTML body.
$oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=TestMail", "BodyFormat=" & $olFormatHTML)
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error creating a mail in folder 'Outlook-UDF-Test\TargetFolder\Mail'. @error = " & @error & ", @extended = " & @extended)
; Add all attachments
$oItem = _OL_ItemAttachmentAdd($oOutlook, $oItem, Default, @ScriptDir & "M:\xmasCard.jpg")
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error adding an attachment to a mail in folder 'Outlook-UDF-Test\TargetFolder\Mail'. @error = " & @error & ", @extended = " & @extended)
; Modify the item to add HTML that refers to the picture
$oItem = _OL_ItemModify($oOutlook, $oItem, Default, "HTMLBody=Bodytext in <b>bold</b><img src='cid:xmasCard.jpg'>Embedded image.")
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error modifying the item in folder 'Outlook-UDF-Test\TargetFolder\Mail'. @error = " & @error & ", @extended = " & @extended)
$oItem.Display
MsgBox(64, "OutlookEX UDF: _OL_ItemCreate Example Script", "Mail with inline picture created.")
Alles anzeigen
Aber ich erhalte schon beim ItemCreate @error=4 @extended=0
Was will mir der Fehler sagen? Warum kann er das Objekt nicht anlegen? Hat es was mit dem Outlook 2013 zu tun?