Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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()

Posted

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.

Please check the Knowledge Base before you post.

"Computers are useless. They can only give you answers." - Pablo Picasso

The Code Net

Posted

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

Posted

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.

Please check the Knowledge Base before you post.

"Computers are useless. They can only give you answers." - Pablo Picasso

The Code Net

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...