How to determine Outlook selected mail mode using C# add-in?

Hi all,
I need to check if a selected MailItem is in compose mode. I use Outlook 2013. MailItem.Sent doesn't help. E.g. I select some e-mail that was clicked Reply and edited and now has a draft status. MailItem.Sent for that item is true. Is that possible to check
if the selected mail in compose mode or check mail draft status?
Thansk in advance.

Hello Maksidrom,
The Sent property is set once and keep the value the rest of the time.
The Outlook object model doesn't provide any other properties for this. You need to use a low-level property -
PR_MESSAGE_FLAGS
. The PR_MESSAGE_FLAGS property contains a bitmask of flags indicating the origin and current state of a message. In general, you are interested in the following value:
MSGFLAG_UNSENT - The message is still being composed. It is saved, but has not been sent. Typically, this flag is cleared after the message is sent.
The DASL name for the property is "http://schemas.microsoft.com/mapi/proptag/0x0E070003". You can use it to get the value using the
PropertyAccessor class. For example:
Sub DemoPropertyAccessorGetProperty()
Dim PropName, Header As String
Dim oMail As Object
Dim oPA As Outlook.PropertyAccessor
'Get first item in the inbox
Set oMail = _
Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
'PR_TRANSPORT_MESSAGE_HEADERS
PropName = "http://schemas.microsoft.com/mapi/proptag/0x007D001E"
'Obtain an instance of PropertyAccessor class
Set oPA = oMail.PropertyAccessor
'Call GetProperty
Header = oPA.GetProperty(PropName)
Debug.Print (Header)
End Sub

Similar Messages

  • How to determine or verify the language used if your application is in mult

    hi,
    How to determine or verify the language used if your application is in multi Language Env.
    Thanks & Regards

    Hi again;
    I suggest also see below link which we discussed before here
    Find languages installed in my R12 instance ?
    Regard
    Helios

  • How to set the full screen mode using setClip method

    hi all,
    how to set the full screen mode using setClip in that softkeys should not be used insteat on that need to create a own softkeys using commands.
    thanks & regards
    Bala.

    In CS5 there are changes made to how the screen mode is reported. In CS3-CS5 the screen mode has a corresponding number. So for instance if the ScreenMode is set to "Preview Off" and you ask indesign CS3 or CS4 to display the screen mode, it will report "1936552047", while in CS5 it will report "PREVIEW_OFF".
    try executing this simple command in respectively CS3, CS4 and CS5 and you will see what I am talking about:
    alert(app.activeWindow.screenMode);
    there is no difference if you do:
    alert(app.activeDocument.layoutWindows[0].screenMode);
    The CS5 solution is rather awkward to work with, unless I am missing something? PREVIEW_OFF is not a string, nor is it a number.
    Example -  doing:
    myScreenMode=app.activeDocument.layoutWindows[0].screenMode;
    and then trying to reset screenMode by something like:
    app.activeDocument.layoutWindows[0].screenMode= myScreenMode
    does not work in CS5 of course. It will throw an error. Neither will this line work:
    app.activeDocument.layoutWindows[0].screenMode=ScreenModeOptions.myScreenMode;
    Any way of working around this?

  • How can I configure Mac Mail to use the correct SMTP server?

    I have successfully set up Mac Mail to use a new e-mail account. Inbound and outbound mail is working just fine. However, I am seeing something odd when I create a new message or reply to an existing message. The outbound account that shows is not that which has been configured for the account. I can manually select the correct outbound account.
    What are my troubleshooting steps?

    One of the first things to check in Mail Preferences, Composing:

  • How to backup outlook 2013 mail?

    Hi All,
    I have a question regarding how to backup outlook 2013 emails. I have a lot of emails in my Outlook 2013, it is connect to Exchange server.
    I want to backup the emails because I have used a lot of space.
    Thanks for your help!

    Hi,
    this article may help:
    http://office.microsoft.com/en-au/outlook-help/export-or-back-up-messages-calendar-tasks-and-contacts-HA102809683.aspx?CTT=1
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How to determine which adapter to be used in a scenario

    Hi All,
    I am new to XI and have some very basic knowledge about it.
    I wish to know if I need to send data from a legacy(system A) to SAp (system B) how do I know what adapter to use. Should I use file, idoc ,JMS etc adapter.
    Is there a specific guide which I can use to know which adapter should be used in which conditions.
    Appreciate if you could guide me to some relavent weblog/steps.
    Thanks
    Shirin

    Hi Shirin,
    Before u start developing the objects in SAP-XI,kindly go through the below  mentioned blogs which would definitely help u in the road ahead.These blogs are meant for the freshers to XI like u...
    /people/sravya.talanki2/blog/2006/12/25/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-i
    /people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
    /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    These would definitely give u a good start into the world of SAP-XI
    Regards,
    Lokesh
    PS:Reward points if useful

  • How to cnange the e-mail address used by iCloud ?

    iCloud syncs my Outlook through the [email protected] email address,
    But I want to change that into my standard e-mail address:
    Can somebody tell me how I could do ?
    Thanks !

    The [email protected] account creates a new folder in my Outlook, that does not sync with my other/standard e-mail address.
    I want to use my iPhone as a full sync mirror copy of my "old" standard outlook 2010 e-mail process.
    That includes that people contact me and receive replies through my "old" e-mail address.
    So my question is: how to use iPhone with my old e-mail address if iCloud communicates with [email protected] only ?

  • How to determine which configuration is being used within a page/view?.

    If I click on the little cog icon to take me into the AET for a given assignment block, how do I know which configuration is being used?. Usually one is highlighted, but the case of the Accounts main address assignment block these details are not shown. As there probably 30 of them I though there must be a quick way to determine which is being used from within the view/page.
    Anyone
    Jas

    Hi Jason, (great performance at the Transporter, but go easy on the steroids )
    There are 2 ways to know that:
    1. put your focus (not in the configuration mode) on one of the fields that are on the block. then press F2. Here you get a popup where there is the configuration searched for and the configuration found.
    2. Within the configuration, when there is no configuration with the configuration key linked to your business role present, the system takes the <DEFAULT> one. there should at least one be highlighted, otherwise you get a dump NO_CONFIG_FOUND.
    When you just press the copy button on the configurations tab, you get your configuration defaulted, this being, the configuration key linked to your business role + the search for component, usage, and subcomponent. here you see what was searched for.
    Hopefully this helps you out a bit.
    KR,
    Micha
    Edited by: Micha Van Nijen on Apr 20, 2010 3:03 PM
    Edited by: Micha Van Nijen on Apr 20, 2010 3:07 PM

  • How to print report in Character mode using Oracle Developer 10g

    Dear,
    I migrate my forms and reports from Oracle Developer 6 to Oracle Developer reports 10g,
    We are using some character mode report for bill printing. But when i run these report through menu on Web i got error message like
    "REP-1920: Character mode runtime incompatible with DESFORMAT of PDF, HTML, HTMLCSS, SPREADSHEET or RTF"
    i don't want to change the character mode to any other mode because it effects the printing.
    so how can it possible to set the mode to character and view report on Web.
    pls. suggest me solution.

    You have to pass the PRT file name as value for the DESFORMAT and use mode= MODE=CHARACTER.
    E.g.
    http://<host name>:<port>/reports/rwservlet?desformat=dflt&mode=character&.....

  • How to print report in Charactor mode using Oracle Developer 10g

    Dear,
    I have converted my few reports from Oracle Developer forms 5 to Oracle Developer forms 10g,
    i am running these reports on Web, for that i have configour "rwserver" server.
    But when i run these report through menu on Web i got error message like
    "REP-1920: Character mode runtime incompatible with DESFORMAT of PDF, HTML, HTMLCSS, SPREADSHEET or RTF"
    i don't want to change the character mode to any other mode because it effects the printing.
    so how can it possible to set the mode to character and view report on Web.
    pls. suggest me solution.
    Thanks

    You have to pass the PRT file name as value for the DESFORMAT and use mode= MODE=CHARACTER.
    E.g.
    http://<host name>:<port>/reports/rwservlet?desformat=dflt&mode=character&.....

  • How to find out the AI mode using traditiona​l NI driver and VC++ 6.0?

    Hello,
    the software I manage is written in VC++ 6.0 and utilizes the traditional NI driver. The board used is PCI6013/6014.
    The AI mode though may be either differential or nonreferenced single ended. By now we configure the board using Measurement and Automation Explorer, which is OK but is not actually friendly for end users. What I would like to have is at least to be able get the current mode somehow so that the program could warn a user the mode should be changed. Better yet if the program could overwrite the current mode setting so that there would be no need to run Measurement and Automation Explorer at all.
    I tried to use AI_Configure function. It looks like it does nothing in this respect - at least for this type of board.
    Is there any other way to achieve my goal (direct access to registry settings?)?
    Thank you in advance,
    Mike Faynberg

    Hi Mike,
    Actually you are on the right path.
    If you use the AI_Configure command then you can set the input configuration of the DAQ Board.  As seen in the Traditional DAQ C Function Reference Help (Start > National Instruments > NI-DAQ):
    AI_Configure
    status = AI_Configure (deviceNumber, chan, inputMode,
    inputRange, polarity, driveAIS)
    Purpose
    Informs Traditional NI-DAQ (Legacy) of the input mode
    (single-ended or differential), input range, and input polarity selected for the
    device. Use this function if you have changed the jumpers affecting the analog
    input configuration from their factory settings. For devices without analog
    input configuration jumpers, this function programs the device for the settings
    you want.
    Parameters
    Direction
    Name
    Type
    Description
    Input
    deviceNumber
    i16
    assigned by Measurement & Automation Explorer
    chan
    i16
    channel to be configured
    inputMode
    i16
    indicates whether channels are configured for single-ended or differential
    operation
    inputRange
    i16
    voltage range of the analog input channels
    polarity
    i16
    indicates whether the ADC is configured for unipolar or bipolar
    operation
    driveAIS
    i16
    indicates whether to drive AISENSE to onboard ground
    Simply by setting this parameter in your code you can set the configuration of the board to whatever you would like for your application.  They won't even have to go into MAX to set up the device!
    Enjoy,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How to set which E-Mail gets used on a group

    I use groups to send specfic E-Mails to specific people. I have two diferent groups with the same people on it, but the E-Mail should be sent to diferent adresses (ex. Home, or Work).
    Since Lion, I can't define anymore in the Group "Home" which E-Mail address from a specific contact should be used...
    How do I do that?

    I have the same problem.  The Address Book Help clearly says to use the Edit>Edit Distribution List.
    However, that option is grayed out.
    Any ideas on why this would be and how to correct it?
    I have already tried turning off Contacts in iCloud in preferences and then waiting and turning it back on.  No change.

  • SharePoint Databases - How to determine which ones are being used and which ones aren't

    I am not sure where to exactly post this question.  On the SQL Server side or on a SharePoint side.
    I am a SQL Server Database Administrator who is monitoring some SharePoint databases.  On a daily basis it seems that they are creating new databases but don't delete the databases that they are no longer using.  For example, they might be testing
    on a development server and if things aren't working properly instead of asking that the databases be deleted they just go ahead and create new databases to do what ever they need to do.  Is there a way on the SQL Server side to determine which SharePoint
    databases are being used and which ones aren't being used?  Or does one determine this information through the SharePoint Central Administration console?
    lcerni

    Hello,
    The following query gives you the databases now in use.
    SELECT
    DISTINCT d.name
    FROM
    sys.dm_tran_locks
    tl INNER
    JOIN sys.databases
    d
    ON
    tl.resource_database_id
    = d.database_id
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to skip the Selection screen while using BAPI_MATERIAL_DELETE

    Hi,
    I have to delete material master.
    I'm using BAPI_MATERIAL_DELETE Fm,
    But while executing this BAPI it is going to a screen where it is asking to tick the Check Box for material number.
    Can you please tell me how to execute the BAPI Avoiding the selection screen.
    Thanks & Regards,
    Rajender

    Hi,
    Thanks for replying.
    We have to run the BAPI in Background, Then how to achieve the default values.
    Thanks & Regards,
    Rajender.

  • How to call RFC in asynchronous mode using JCo.

    I have java class and want to call R/3 through JCo in asynchronous mode. Is there any solution for this?

    Hi,
    Go through these links
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/09/a4a9e1d51d11d6b2c200508b5d5c51/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/18/6052429f2dbd30e10000000a155106/frameset.htm
    Re: Connecting to R/3 database using JDBC or JCO
    Thanks
    Lohi.

Maybe you are looking for

  • Why are my PXI cards not recognized by Windows or MAX?

    I have a PXI-1045 chassis connected to a PC through MXI-4.  When I turn the chassis and PC on with a PXI card in slot 2, the message "Windows could not load the installer for DAQDevice.  Contact your hardware vendor for assistance." appears, and the

  • 37e200u No picture only sound

    After an apparent power drain that caused household lights to dim, the picture on my tv disappeared. The sound is still playing, but I cannot bring up any menus or anything. HELP!

  • ALV date format problem

    Hi , I Created an ALV report in that I am getting the sales order details... and once I get the list I am moving to excel sheet ... Once I moved to excel sheet by creating the layout , I am getting DAT colums as 00.00.0000 if the cell is empty.. how

  • Transfer apps/games to sd card

    Why cant sony just allow this feature again. Seems pointless to market it as an hd gaming smartphone if you are limited to using the 11GB storage for installing huge hd games right? Plus it would also solve the insufficient storage problem. A 33MB up

  • HT201250 Third Party Apps With Time Machine Backup

    My Retina MBP screen is ghosting so they might have to replace the whole computer. Will a Time Machine restore re-add my third party applications like Star Craft and Adobe Photoshop? or will I need to hunt down the discs and reinstall them manually