Garethp / php-ews

PHP Exchange Web Services
BSD 3-Clause "New" or "Revised" License
112 stars 45 forks source link

Get Email ID per VBA and pass to PHP-URL #137

Closed basementmedia2 closed 6 years ago

basementmedia2 commented 6 years ago

Sorry, another parallel issue... with the following piece of php i get the Email-ID:

$email = $api->getItem($email->getItemId());
$email_id=$email->getItemId()->getId();

But is it also possible to get the same ID via VBA from Outlook? I want to have a button in Outlook which opens the URL of my PHP script and passes the Email ID of the currently selected Email in outlook and then displays the Email (and some custom fields).

I have tried the following VBA (i know...VBA is not theme of this platform but maybe you can help me anyway ;-(?

Sub DisplayMailID()
    Dim Msg, MailID
    MailID = ActiveExplorer.Selection.Item(1).EntryID
    MsgBox ("MailID:" & MailID)
End Sub

Best regards Daniel

Garethp commented 6 years ago

I'm sorry, I don't know the API for outlook in VBA