Home > front end >  Outlook Explorer Object Giving 'NULL' Attachment Selection
Outlook Explorer Object Giving 'NULL' Attachment Selection

Time:01-13

I want a selected attachments from below window.

I have used Explorer.AttachmentSelection method. But its not giving me any selection.

How to achieve it?

enter image description here

CodePudding user response:

The AttachmentSelection object contains a read-only collection of attachments that are selected in an item that is in the active inspector or the active explorer. Use the ActiveExplorer method of the Application class which returns the topmost Explorer object on the desktop. An Explorer that represents the topmost explorer on the desktop is returned. You may get Nothing or Null if no explorer is active. So, you may get null if no attachments is selected in the view.

I'd suggest click on any attachment in the view and validate how the code is working. You should get the attachment instance selected in the Outlook view.

CodePudding user response:

You actually need to select an attachment in the preview pane (so that "Back to message" button becomes visible) for Explorer.AttachmentSelection collection to contain anything.

  • Related