Outlook Add-In Mail Item How to use the mailitem object after .send() is called on it?

Hello,
I am developing an outlook add-in, where I have added a custom button to "send & process" the mail item.
I want to first send the mail - by writing 
((Outlook._MailItem)mailItem).Send();
but after the mail item is sent, I am unable to process the mail item object.
Could some one please guide, how to tackle this?
Thanks!
-Vinay Pugalia
If a post answers your question, please click "Mark As Answer" on that post or
"Vote as Helpful".
Web : Inkey Solutions
Blog : My Blog
Email : Vinay Pugalia

I get the above error in Visual Studio 2013 Ultimate when I process my mailItem in the ItemAdd event
handler.
Upon search, the above error seems to be related to Visual Studio but still searching to find a fix for
it.
In the code, I just read the Recepients of the mailItem, save the mailItem as .msg file to a physical
location & upload the .msg file to a FTP location.
Sorry to say, but sharing the code would not be possible due to NDA.
Could you please guide further?
-Vinay Pugalia
If a post answers your question, please click "Mark As Answer" on that post or
"Vote as Helpful".
Web : Inkey Solutions
Blog : My Blog
Email : Vinay Pugalia

Similar Messages

  • Outlook Add-In Mail Item How to save the mail item (which is in compose mode) as a .msg file in non editable form?

    Hello,
    I am working on an outlook add-in where I have a custom button on the ribbon tab of compose mail item.
    My requirement is to save the mail item currently being composed as a .msg file at a predefined location on click of my custom "Save" button. I am able to do it using "mailItem.SaveAs(...)".
    But my problem is, when I open the .msg file in outlook, it is opened in compose mode but I want to see it as a read-only item. For e.g. exactly the way it looks when I save it after it's sent.
    Could you share any ideas on how to achieve this?
    Thanks,
    Vinay
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Strictly speaking you need to *remove* the MSGFLAG_UNSENT bit (=8), not set the MSGFLAG_READ bit, so setting the PR_MESSAGE_FLAGS property to either 0 or 1 will work. Keep in mind that you can remove the MSGFLAG_UNSENT bit only before the message
    is saved for the very first time. If you touch the bit after the message was saved, the message will stay unsent.
    Also note that this may not be what the user wants since the message will become read-only when reopened.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • How to use  the same channel to send a file and messages to the server

    I'm trying to develop a simple program that will send and receive files from the server and in the same time I need to communicate with the server through the messages
    I'm using TCP Socket
    my problem is
    I have only one channel
    so, I have no option, either I can use it for sending the file itself or sending the message .. but not both !
    my question is : How can I use the same channel for sending and receiving (file & message)
    I would appreciate for any clue or hint
    best

    kajbj wrote:
    kmarwani wrote:
    Thanks for reply
    yes, that what I'm thinking to do
    but, in case of sending binary file, if I attached a flag on its header, will it corrupt the file ?
    bestThe other end would of course need to decode the messages that you get, and only write the "data" part to the file.Thanks
    I'm gonna try to hard-code what you suggest and i will post what happen with me here
    even though I'm not sure how can I add header to a binary file and remove it from the file at other end. (coz I read it as stream and send as array without touching its contents)
    this how I'm sending the file
    ConnSocket = CSocket.accept();
    ToClient = new DataOutputStream(ConnSocket.getOutputStream());
    File myFile = new File("abc.jpg");
    FileInputStream myFileInStream = new FileInputStream(myFile);
    BufferedInputStream mybuffInStream = new BufferedInputStream(myFileInStream);
    myBytArray = new byte[(int) myFile.length()];
    mybuffInStream.read(myBytArray, 0, myBytArray.length);
    ToClient.write(myBytArray, 0, myBytArray.length);
    ToClient.flush();
    myFileInStream.close();best

  • How to use the ViewRowImpl objects in JSP?

    Is there anyway for me to use the ViewRowImpl objects in the JSP (so I could call the set<attribute> methods and get<attribute> methods to retrieve the attributes? Right now I am retrieving all the information I need in the application tier from the database, marshal them myself, and then return the marshaled data back to the JSP side in the presentation tier, then demarshal the data, and finally interpret the demarshaled data. I did this because I want to return everything in one single remote method call, and I know this is really ugly, but I do not know of any other way for me to retrieve all information needed by a JSP page in one single method call. Any suggestions?

    I've done this in servlets.
    I created an application module (with an ic.lookup() call, see the documentation) and then used the appModule to create my view.
    Once you've got that you can iterate through rows and use the accessor methods.
    You might need a wrapper method to get the ViewObjectImpl in your jsp...

  • Outlook Add-In Mail Item Address How to get the email address for Receipents & Sender?

    Hello,
    I am developing an outlook add-in and unable to retrieve the email address from the To,CC,BCC field & the "Sender".
    I have written the below code - 
    //Prepare list of receipients.
    List<string> emailIds = new List<string>();
    foreach (Outlook.Recipient recipient in mailItem.Recipients)
    { emailIds.Add(recipient.Address); }
    emailIds.Add(mailItem.SenderEmailAddress);
    In the code above, if the receipient/sender address is saved in the address book, I get the details else "null".
    Could someone please help me in fetching the correct email address irrespective of it been saved in the address book or not?
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hello Starain,
    I am sorry but I do not understand why this is happening as I get proper results.
    Coming to the recipient from the address book, I just want to re-confirm what we mean by "recipient
    from the address book". By this, I mean that whether my recipient is a contact in the outlook address book or not, I get proper email address.
    Please confirm are we on the same page? As other than this, I do not see any difference.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

  • How to use the system recovery after add another SSD?

    Dear all,
    I got a Zbook14 with 1TB HDD with Windows 7 in default. Soon after I received it, I added an M.2 256Gb SSD and migrated my system drive to the SSD. 
    After an malfunction of the HP Client Security that encrypted my system drive (in SSD). I used the HP recovery tool to reset the computer into the default factory status... This action, which I can not select the harddrive during the recovery, wiped my oroginal system paratation (now the data drive) in the 1TB HDD, and thus I have to migrate the system again (not mentioning the data in that partation..).
    I wonder if I can change the target drive for the recovery? I did not move the original HP partations from the HDD to SSD. Only the system partation is moved to SSD.
    Thanks. 

    You don't have any option in terms of changing the target drive for an HP recovery performed by the HP recovery manager.
    It is scripted and there is nothing that you as the user can change other than selecting the type of recovery desired.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • How to use the bex broadcasting to send emails

    Hi Gurus,
    i made a web report, in this report , i have to send an email to some directions based in what characteristic get the value = 1,
    example:
           KF
    x=    1        send email to   pp@....
    y=    1        send email to   gg@....
    The web report is ready, now how can i use the bex broadcasting to do this funtion, please step by step, i'll really appreciate it! thanks !

    Hi Jorge,
    I am not a guru still would like to answer your query...
    You selected Broadcast by E-Mail as the distribution type when you created the broadcast setting then need to send to your systems administrator, he is the one who is responsibile to make this if and then functions coordinate with him-> Various settings need to be made in system administration in order to use information broadcasting. Furthermore, there are a number of broadcast functions that can be made by business experts and in system administration.
    If you want to guide him then.. when you make the precalculations for setting the broadcast there in Variable Assignment you can mention this as a formula
    Variable Assignment: You can create values for the BI objectu2019s input-ready variables (Query, Query View, Report, or Web Application). The BI object is precalculated using these variable values. These variable values are set whenever an online link is opened.
    Take from Variant: You can select from a variant for the BI object (Query, Query View, Report, or Web Application). The BI object is precalculated with the values of the variant. These variable values are set in accordance with the variant whenever an online link is opened
    To be honest I think Basis should help you trace where exactly to mention such request...

  • How to use the Java objects or methods in pl/sql function as a parameter

    dear all,
    I java object passed as a parameter in pl/sql. how can i access the java objects as parameter in pl/sql function. please give a soultion to me
    mohan reddy

    I'm not sure whether this would help you.
    Have a look at this program to list files from a directory.
    CREATE GLOBAL TEMPORARY TABLE DIR_LIST
    ( FILENAME VARCHAR2(255) )
    ON COMMIT DELETE ROWS
    Table created.
    create or replace
    and compile java source named "DirList"
    as
    import java.io.*;
    import java.sql.*;
    public class DirList
    public static void getList(String directory)
    throws SQLException
    File path = new File( directory );
    String[] list = path.list();
    String element;
    for(int i = 0; i < list.length; i++)
    element = list;
    #sql { INSERT INTO DIR_LIST (FILENAME)
    VALUES (:element) };
    Java created.
    SQL>
    create or replace
    procedure get_dir_list( p_directory in varchar2 )
    as language java
    name 'DirList.getList( java.lang.String )';
    SQL> exec get_dir_list( 'C:\Bhagat' );
    PL/SQL procedure successfully completed.
    Thanks,
    Bhagat

  • How to use the output result after executing SUBMIT

    Hi,
    We want to use a field value which should come from the result of running a standard Report in our own customer program.
    And if using SUBMIT command to run that report and then using 'LIST_FROM_MEMORY' to call the result, but it seems the result is in Unicode mode, we can't directly use that result in the called program.  What do we need to do? Is there other FM to convert the result?  Thanks in advance for your valuable input.
    Regards

    use of LIST_TO_ASCI?

  • How to close the Sound object

    I'm using Flash CS3, running code in ActionScript 3.
    I use the Loader class to load a child SWF file, which then
    takes over the entire area on my website that is reserved for
    Flash. If the user decides to stop watching the SWF file before it
    is completed, he hits the "close" button within the child SWF,
    ultimately causing the Loader.unload() method to be executed. So
    far, so good, only the sound from the remaining portion of the SWF
    file keeps playing. According to the Flash Docs for the
    Loader.unload() method:
    "As a best practice, before you unload a child SWF file, you
    should explicitly close any streams in the child SWF file's
    objects, such as LocalConnection, NetConnection, NetStream, and
    Sound objects. Otherwise, audio in the child SWF file might
    continue to play, even though the child SWF file was unloaded."
    It then gives an example that assumes you already have access
    to the Sound object, so closing the Sound object is done by:
    mySound.close();
    The only problem is that I have no idea how to access the
    Sound object when I use the Loader.load() method. Where is this
    beast? I can't seem to find anything in the documentation that
    tells me how to find the Sound object after calling Loader.load().
    As a temporary fix, I modified the target SWF file so that when the
    "close" button is hit, it calls the "stop()" function; however,
    this only stops the sound, it does not close the associated Sound
    object, and I presume it continues to lurk around in memory with
    nothing useful to do. (When the user hits the "close" button in the
    child SWF file, it creates a "bubbling" event so that the Loader
    class can call the Loader.unload() method on it.)
    I've attached code for your reference.
    Any help is deeply appreciated!
    -Dan

    Ack! Looks like I hijacked this thread, sorry.
    I'm doing almost exactly the same thing the OP is doing...
    Loader class to load an external SWF (which is a video file FLV).
    If the user hits the "close" button on the video, the video goes
    away as it should but the audio continues.
    I understand that I need to close any NetConnection and
    NetStream objects in addition to unloading the movie. What I don't
    understand is how to do that. I'm sure that it's a syntax thing I'm
    just not getting right. I would just really like a more detailed
    explanation of stopping NetConnections and NetStreams (but an
    explanation for the not-so-actionscript-experienced LOL).
    Thanks.

  • Using the timeline in After Effects CS3

    Hi everryone
    does anyone know how to use the timeline in after effects, is it the same as flash, as it seems to be different (more complicated!) anyone got any tips or ideas which may help me,
    thanks
    I appreciate it
    Helen

    > They are different in their approach but are both keyframe-based timelines.
    I use both programs daily.
    I bow, Steve.
    Just having the Flash icon on my Mac gives me the creeps.
    It's an irrational emotional issue for me, much like my loathing of Photoshop.
    About six years ago, ten of us attended a two day immersion Flash class. These are filmmakers and and Photoshop geeks. In 16 hours of instruction, exercises and tutorials, no one ever said "Cool." Not once. it was monstrous.
    bogiesan

  • Outlook 2010 sent mail items are being deleted and found in recovered items

    My user has this issue with Sent Mail items not staying in the Sent items folder. Items are being sent to the sender. The mail messages are found in the recover items folder as if the deleted items folder was being emptied. This is not the case. No mail
    rules have been set to move items to the deleted items folder. User does not have the option of clearing the deleted items folder upon exit of outlook. This does not occur on every message. This at times happens immediately after sending the message. The option
    is selected in outlook to keep a copy of sent messages in the Sent Items folder. These are messages that are needed to be saved and have proof of them being sent to the end user.

    Hi,
    Is this issue reproduceable on OWA?
    Please make sure the user doesn't use the account on other devices, which may possibly cause this problem to occur.
    In case the hidden rules in Outlook caused the problem ,you can also try to use MFCMAPI to check and delete hidden rules from outlook:
    http://mfcmapi.codeplex.com/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    We can also try creating a new profile to set up the account, I've seem similar issues which were resolved by this:
    http://support.microsoft.com/kb/829918/en-us
    Regards,
    Melon Chen
    TechNet Community Support

  • Does anyone know how to use the bcc functionality for apple mail while accessing it on the cloud from my PC?

    I am currently away from my MAC and want to send an email through apple mail with the bcc functionality.  I am using the cloud to get to my mail, however, I can't figure out how to use the BCC functionality, please help.  Thanks!

    Open your mail,
    lower left corner click on settings,
    go to composing and check BCC, save and your done

  • I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to sen

    I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to send emails with photos embedded. I like adding the frames and backgrounds and I think it's easier for recipients to look at the photos. Thanks for any suggestions of things to try.
    Gail

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

Maybe you are looking for

  • Error while using CSVDE

    hello all, i faced a problem while create users using csvde and ldife too not working, always i got error. dn,ObjectClass,sAMAccountName,userPrincipalName,Description,UserAccountControl "cn=Ahmed Essam,OU=IT,Dc=almanhal,Dc=eg,Dc=local",User,Ahmed.Ess

  • I deleted acrobat reader because I couldn't get Flash. Now I have Flash, but no reader. Please help

    I have windows vista business. I recently deleted my acrobat reader and re-installed FLASH. But now when I got to adobe.com, the acrobat reader will not download. It keeps trying, but no dialogue box pops up to saveas or run it. Please help. peace jo

  • ALV download to EXCEL -- probs with SAPGUI 6.40 and EXCEL 2007

    I have a method in an ALV grid which performs a dowload to excel Here's the method method download_to_excel. field-symbols:        <fs0> type standard table,        <fs1> type standard table.     assign g_outtab1->* to <fs0>.     assign g_fldcat1->*

  • Extra hard disk via USB time capsule (2TB) does not show in finder etc

    I've found hunderds of questions that look alike but not one has solved it. I have a Time Capsule with 2 TB hard disk. In all descriptions of the TC Apple states that an extra drive can be attached through the USB. I did that. Wanting to create an ex

  • Insert into two tables, how to insert multiple slave records

    Hi, I have a problem with insert into two tables wizard. The wizard works fine and I can add my records, but I need to enter multiple slave table records. My database: table: paper `id_paper` INTEGER(11) NOT NULL AUTO_INCREMENT, `make` VARCHAR(20) CO