ganders Posted September 1, 2005 Posted September 1, 2005 hi the following code opens an outlook mailitem. but what happens, if the user doesn't have outlook installed on his machine?? is there a way to detect the users default mailclient and open a mailitem of this mailclient (i.e. netscape,..)? best regards Dim pApp As Outlook.Application Dim pMail As Outlook.MailItem pApp = CreateObject("Outlook.Application") pMail = pApp.CreateItem(Outlook.OlItemType.olMailItem) pMail.Display() Quote
mark007 Posted September 2, 2005 Posted September 2, 2005 You could shellexecute a hyperlink mailto:emailaddy@server.com?subject=subject This would do the same as clicking an email address on a web page i.e. open a new mail in the default mail app. Quote Please check the Knowledge Base before you post. "Computers are useless. They can only give you answers." - Pablo Picasso The Code Net
ganders Posted September 5, 2005 Author Posted September 5, 2005 attachments? hi tx for your reply. the problem is: the newly created mail sould contain an attachment. and as far as i know, this isn't supported in the mailto-protocol. or is it?? how can i open a mailitem containing an attachment? regards Quote
mark007 Posted September 5, 2005 Posted September 5, 2005 In that case I'm pretty sure what you are trying to accomplish is not possible. Only possible ways round it that I can think of are: 1. Write code for all possible applications and ask the user/look up in the registry which piece of code is required or 2. write an smtp calss and ask the user for their details then send it yourself. Quote Please check the Knowledge Base before you post. "Computers are useless. They can only give you answers." - Pablo Picasso The Code Net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.