First trial to create note from Outlook

So i use a combination of the Hotfolder Plugin and a very rudimentary VBA function to save the attachments to a location on my harddrive and let the plugin do the rest. I then call this function from inside @rami.sedhom 's original code - i should probably check to see if there are attachments before calling it, but like i said, rudimentary.

I set up a global variable called attachmentName, which I use to append to the title of the note that's created in Joplin, so i can more easily determine which notes to merge when I get there. The end result looks like this, although in writing this out I've just this second realised this doesn't handle multiple attachments well at all and my guess is it will just take the name of the last attachment on the email.

joplin1

Hope this is helpful

Option Explicit

Dim attachmentName As String
Public Function sendAttachmentToJoplin(mItem As Variant)

Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String

sSaveFolder = ' location of your hotfolder

On Error GoTo ErrorMess2

For Each oAttachment In mItem.Attachments
        'Debug.Print oAttachment.DisplayName;
        oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
        attachmentName = " (" & oAttachment.DisplayName & ")"
Next oAttachment


Exit Function

ErrorMess2:
    Debug.Print "ERROR: "; mItem.ConversationTopic; " 02"

End Function

EDIT: I should also say, this includes all those irritating picture people put in their signatures too. And I'm not sure if it's to do with how I'm exporting them from outlook, or how the hotfolder plugin brings them in, but they come in as complete gobbledygook.