|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sending emails with MAPII'd like to send emaisl from a Java application using MAPI. Everything works so far, but I have a special requirement: I want to open the email window from Outlook with the subject, the text and the recipients already filled. The user can then edit everything (subject, text and recipients). After the user has sentthe email I'd like to capture his changes, that is, I need to get the text and the recipients AFTER the email has been sent (the subject isn't needed anymore). How can I get these data? What I am currently doing is: a) create the email b) open the window with the method "Display" from MailItem c) the user then sends the email d) I take the latest entry from the folder "Sent items" and take those values (recipients and text). However, I am running into problems if Outlook is not configured to put a copy into "Sent items". If Outlook won't put in a copy, I have no chance of getting those values. Is there a way to assure programmatically that a copy will be put in the folder "Sent Items"? Or is there an apporach better suited for may problem? I have already thought of checking the values in the registry resp. manipulating those values programmatically, but this would only be the last thing to do, if everything else fails, since I regard this "solution" as dirty... Is there a way to force Outlook programmatically putting copies into "sent items"? Or can I check the configuration of Outlook (checking if copies are enabled) using the Outlook object model? I can access anything from Java, I just need to know which way to go. Thanks a lot and merry christmas, Rudi Hi Rudolf,
OL fires Application.ItemSend and MailItem.Send if the user presses the send button. For MailItem.Send you will need a handler (instance of a class module) for each opened Inspector. -- Show quoteHide quoteViele Grüße Michael Bauer "Rudolf Ziegaus" <Rudolf.Zieg***@gmx.de> wrote in message news:ef1gbry5EHA.2156@TK2MSFTNGP10.phx.gbl... > Hello, > > I'd like to send emaisl from a Java application using MAPI. Everything works > so far, but I have a special requirement: > I want to open the email window from Outlook with the subject, the text and > the recipients already filled. The user can then edit everything (subject, > text and recipients). After the user has sentthe email I'd like to capture > his changes, that is, I need to get the text and the recipients AFTER the > email has been sent (the subject isn't needed anymore). > > How can I get these data? What I am currently doing is: > > a) create the email > b) open the window with the method "Display" from MailItem > c) the user then sends the email > d) I take the latest entry from the folder "Sent items" and take those > values (recipients and text). > > However, I am running into problems if Outlook is not configured to put a > copy into "Sent items". If Outlook won't put in a copy, I have no chance of > getting those values. > > Is there a way to assure programmatically that a copy will be put in the > folder "Sent Items"? Or is there an apporach better suited for may problem? > > I have already thought of checking the values in the registry resp. > manipulating those values programmatically, but this would only be the last > thing to do, if everything else fails, since I regard this "solution" as > dirty... > > Is there a way to force Outlook programmatically putting copies into "sent > items"? Or can I check the configuration of Outlook (checking if copies are > enabled) using the Outlook object model? > I can access anything from Java, I just need to know which way to go. > > > Thanks a lot and merry christmas, > > > Rudi > >
Show quote
Hide quote
"Michael Bauer" <mi***@t-online.de> schrieb im Newsbeitrag Hi Michael,news:eF$LI9y5EHA.2540@TK2MSFTNGP09.phx.gbl... > Hi Rudolf, > > OL fires Application.ItemSend and MailItem.Send if the user presses the > send button. > > For MailItem.Send you will need a handler (instance of a class module) > for each opened Inspector. > > -- > Viele Grüße > Michael Bauer > thanks for your hint. I got it up and running in VBA, now I just have to find a way to do it in Java. But this is definitively the way to go for me. Rudi Hi Rudolf,
thanks for your feedback. Unfortunately, for Java I can´t help you. -- Show quoteHide quoteViele Grüße Michael Bauer "Rudolf Ziegaus" <Rudolf.Zieg***@gmx.de> wrote in message news:OLa0RyL6EHA.1596@tk2msftngp13.phx.gbl... > > "Michael Bauer" <mi***@t-online.de> schrieb im Newsbeitrag > news:eF$LI9y5EHA.2540@TK2MSFTNGP09.phx.gbl... > > Hi Rudolf, > > > > OL fires Application.ItemSend and MailItem.Send if the user presses the > > send button. > > > > For MailItem.Send you will need a handler (instance of a class module) > > for each opened Inspector. > > > > -- > > Viele Grüße > > Michael Bauer > > > > Hi Michael, > > > thanks for your hint. I got it up and running in VBA, now I just have to > find a way to do it in Java. But this is definitively the way to go for me. > > > Rudi > >
Other interesting topics
Can Outlook.Application be used to control open message windows?
Controlling Outlook from Word VBA - PROBLEM... Outlook VBA - Need to grab SMTP address, not Contact Name Late Binding to Outlook from Excel: Outlook modifies email body Inspector CommandBarButton with Word as Mail Late binding to Outlook via VBA Can't set Outlook Express as the default mail client how to retrieve message from an Inbox other than my primary one? Open mail in olFolderSentMail with Extended MAPI or Automation Sticking a picture |
|||||||||||||||||||||||