0

Our vb6 application allows users to open an email with an attachment in Outlook (user clicking on cmdEmail opens Outlook in new process with details populated and a document attached). I've been asked to extend this so that an email with attachment can be opened in the new Windows 10 mail app.

Is anyone aware of any way to do this?

I've tried a few avenues:

I can't use mailto: because of the attachment requirement. I can create the email in the win10 app, but Attachment= or Attach= don't work

I've tried Simple MAPI and CDO but had trouble even getting it to work with Outlook because of an "unspecified error" when trying to send with showdialog = true, or a security warning when opening the address book when showdialog = false (although showing the client is a requirement). I've also read it's not supported by Outlook 2010 (or 2007 for CDO) so I'm doubtful it will be supported by the mail app.

The vb6 application automates Outlook by creating an Outlook.Application object (same sort of method as shown here https://support.microsoft.com/en-us/kb/220595). Is there anyway to recreate this sort of logic with the Mail app? I can't see any object models online or see an object library in my program files.

Has anyone else managed to do this, or might be able to suggest an avenue I can explore? I've not done anything like this before (even mailto was new to me) so any suggestion or point-in-a-direction would be appreciated

Thanks

  • I'm afraid the app does not support automation like Outlook does, it has no object model you can interact with and other hacks don't work (http://stackoverflow.com/questions/31917028/how-to-open-new-email-with-attachment-in-windows-10-mail-app?lq=1) – Alex K. Jun 14 '16 at 11:37
  • 1
    Do you need to use an external application at all? CDO can send email with attachments all on its own (to an smtp server) – Alex K. Jun 14 '16 at 11:38
  • Yes, unfortunately we do need to show the client as the user needs to be able to amend the body and text if they wish. Think I may just have to have a chat to BA about the requirements. Thanks for the help – Rachel Gray Jun 14 '16 at 11:47
  • You could create your own email form in VB6 and use that as the UI. – Alex K. Jun 14 '16 at 11:51
  • Yeah, I was thinking that, but it feels like a step backwards from what we have for outlook at the moment – Rachel Gray Jun 14 '16 at 12:11

0 Answers0