How to get the mail item opened window?

Hi,
I need to get the window of the opened mail.
Within the mailItem.Open() event tried to get the Application.ActiveExplorer() but it returns the main outlook window.
From the load of the addin tried as follows, but hwndSource always returns null.
activeWindow = _mailItem.Application.ActiveWindow()
((Microsoft.Office.Interop.Outlook.ExplorerEvents_10_Event)activeWindow).Deactivate += MyEvent
public void MyEvent()
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process process in processes)
if (process.MainWindowTitle.StartsWith (_mailItem.Subject))
IntPtr handle = process.MainWindowHandle;
System.Windows.Interop.HwndSource hwndSource = System.Windows.Interop.HwndSource.FromHwnd(handle);
System.Windows.Window window = hwndSource.RootVisual as System.Windows.Window;
Any suggestions to get the mail item opened window? Please help.
VS2010 C# with Outlook 2007.

Hi Damian,
When the Open event is fired, the Inspector object
is initialized but not yet displayed.
You can handle the
NewInspector event of the Inspectors class which is fired whenever a new inspector window is
opened, either as a result of user action or through program code. Then the
Activate event of the Inspector class is fired, when an inspector becomes the active window,
either as a result of user action or through program code. 

Similar Messages

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • HELP!! How to get the position of active windows in the desktop

    How to get the position of active windows in the desktop

    You mean, active windows other than the program you're running, or windows the program puts there? And a real desktop (like where MyComputer is), or a desktop pane?

  • I have recently had to fire my web designer who was using iWeb.  Now I'm trying to figure out how to get the site to open in iWeb on my new MacBook Pro.  Is there a way?

    I have recently had to fire my web designer who was using iWeb.  Now I'm trying to figure out how to get the site to open in iWeb on my new MacBook Pro.  Is there a way?

    Firstly iWeb CAN'T IMPORT any kind of published html code as it has no import facility.  You can however add html code, javascript and css by selecting the html snippet and placing it on your page the entering the code in here and clicking on Apply.  You DO NOT create a shape as you say - you use the html snippet and place your code in there.
    There are not really a lot of ways in which you can write code - if you want to enter small amounts of code, then you would use an ordinary text editor to do this such as Text Edit on a Mac or Text Wrangler.  If you want to add code to iWeb like this, then you would either use the html snippet method in iWeb itself or you would have to publish the site to a local folder from iWeb and open the relevant html page with a text editor and add the additional code in this way and then publish.  However, if he decided to add the code with a text editor, then you would have to upload the pages directly to the server using an ftp client - if you try to upload the site directly from iWeb, all the extra code will be overwritten.
    As for checking whether the site was created using iWeb, all you need do is view the site in Safari and then click on View and then select View Source Code and it will tell you.
    Even thoough extra code was added to the site and he might well have done this by publishing to a local folder and adding the code with a text editor, he should still have the domain file for the site too.
    Ask again.  I'm sure that for adding quick code, most would not want to use programmes such as Dreamweaver, but a simple text editor will suffice.  As OT already said, if he claims that he does not have the domain.sites file, then try Flux 4 which is a web design programme and has full import facilities.  At least this way, if he just gives you the published version of the site, you have some way of opening it.
    You can download a free trial of Flux 4 and you can also purchase the full version from the Mac App Store if you decide you like it.

  • 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!

  • How to get the selected items from listbox

    Regarding listbox i have two questions
    1) I want to get the selected items as per the order in which ihave selected.Presently i'm getting in the ascending order.For example after selcting the 1,2,6 if i select 3 then its giving 1,2,3,6.But i want it in the order 1,2,6,3
    2)I want to select items from a single list box to many other listboxes.(ie) my first selection should goto first,second one to the second listbox and like this.How should i write the logic.
    please give me a suggestion.

    In order to have the selected items line up in accordance to the selection order, please do it one at a time. (That's the limit for that VI)
    If you need more than that (i.e. to regconize which item clicked first and which one comes later), you may have to figure it out ya
    Wish you good luck. Perhaps, someone else has a already made vi.
    Cheers!
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

  • How to get the device token in windows phone 8 sliverlight application?

    Hi,
    I am developing a windows phone 8 silverlight application . For my application I want to add push notification service , for this service I have to call one web service in my app . This api requires device token , device id ..etc , I am able to get the all
    the things except devicetoken .
    How to get the device token of a device ?
    any help?
    Thanks...
    Suresh.M

    Most probably device token is the push channel url which is returned by MPNS when a request is made to it.
    Step 3 here: Push notifications for Windows Phone 8
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How to get the Clicked Item of a ListBox?

    I need to get the clicked item of a listbox.
    The item can be at first selected, when I click it again, it
    automatically gets de-selected, but I want to get that item
    whenever I click it. Any idea how to do this?
    This line does not work, because it gets the selected item.
    var pattern:String = event.currentTarget.selectedItem.myname;
    This one must work,but something is missing.
    Anyone can help me with this?
    marks is my ArrayCollection;
    var pattern:String =marks.getItemAt[??].myname;

    Here is my code. Am using this function in the itemclick
    event of the ListBox.
    My ListBox is a multi-select listbox. So am selecting several
    items by pressing "Ctrl" key and selecting each item using click.
    Say I have selected 4 items, when I press "Ctrl" and
    de-select one of the items, I want to get the itemname of the
    deselected item.
    public function createMarksList(event:ListEvent):void{
    // Alert.show(new
    String(event.currentTarget.selectedItem.myname));
    // var pattern:String =
    event.currentTarget.selectedItem.myname;
    // pattern = pattern += "," + pattern;
    // text1.text = pattern;
    <mx:List x="9" y="46" width="121" height="121"
    id="lstMarks" allowMultipleSelection="true"
    itemClick="createMarksList(event)"></mx:List>
    So, your help is required here buddy.
    I sitll can't figure out.
    Thx

  • How to get the Purchased item details in R12

    Hello everyone, am using Oracle Application R12,
    I need the following details for the all purchased item,
    how to get the item_id,item_name,vendor_name,ordered_quantity,rec eived_quantity,
    returned_quantity.
    Thank you.
    Regards,
    Gurujothi.

    Hi Gurujothi,
    pl.try the following SQL. it will give you complete details of purchasing.
    SELECT A.SEGMENT1 PO_NO, B.LINE_NUM, C.SHIPMENT_NUM,
    C.QUANTITY,C.QUANTITY_ACCEPTED,C.QUANTITY_BILLED,C.QUANTITY_CANCELLED,C.QUANTITY_RECEIVED,C.QUANTITY_REJECTED,D.QUANTITY QUANTITY_RETURNED,
    B.ITEM_ID,E.DESCRIPTION,F.VENDOR_NAME
    FROM PO_HEADERS_ALL A , PO_LINES_ALL B , PO_LINE_LOCATIONS_ALL C , RCV_TRANSACTIONS D, MTL_SYSTEM_ITEMS_B E , PO_VENDORS F
    WHERE A.ORG_ID = &OU_NAME
    AND A.PO_HEADER_ID = &PO_HEADER_ID
    AND B.PO_HEADER_ID = A.PO_HEADER_ID
    AND C.PO_LINE_ID = B.PO_LINE_ID
    AND D.PO_LINE_LOCATION_ID (+) = C.LINE_LOCATION_ID
    AND D.TRANSACTION_TYPE (+) ='RETURN TO VENDOR'
    AND E.INVENTORY_ITEM_ID = B.ITEM_ID
    AND E.ORGANIZATION_ID = C.SHIP_TO_ORGANIZATION_ID
    AND F.VENDOR_ID=A.VENDOR_ID
    regards
    sanjay

  • How to get the selected item of a ListBox if it's contents are binded data? (Please read)

    So, I am making an application in which binds data from a WebClient to a ListBox. Thus, it is needed to understand that I did not create this data, it is from a Web API. So my goal is to be able to click on any of the items in the list box(which are binded
    from a web API) and open a pop-up to display more data binded from that specific area.
    Example:
    The data has been loaded and I click on the 2nd item, well this item is a Metallica concert located in Russia blah blah.. ok, so I press it, it opens a pop up with more info like the date, location, etc...
    Info:
    I am binding the things in the lost box from and "events" statement, and I want the data in the list box in the pop up to display the selected child item, "event".
    Zack Bowling

    So are you storing that 'more info data' along with main data(i.e. that metallica concert etc.) somewhere in a List/observableCollection/database etc, if yes then probably it can be fetched directly from that collection. 
    e.g.
    private void listBox_Tap(object sender, System.Windows.Input.GestureEventArgs e)
    var Itemobj = (listboxname.SelectedItem) as ObjectClassname; string datevalue = Itemobj.date; string location = Itemobj.location;
    //so using Itemobj you can fetch the properties you want as stored in ObjectClassname.
    // Here ObjectClassname is the name of class storing the properties(setter-getter) for the parsed data.
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How to get the data of Open Opportunities and Closed Opportunities

    Hi Guys,
      i'm studying about Sales Opportunities in SAP BusinessOne.
    i'm able to get the data about Sales Opportunities(i enterd), Opportunities Report and Lost Opportunities.
    But i dont know how to get information about Open Opportunities Reports and Closed Opportunitiesn Reports.i'm unable to find even their names of tables.
    plz send a reply.................
       with regards,
    santh

    Thanq Alexey for ur Helpful Answer,
       i'm aware about execution of a query in the Query Analyzer of SQL Server.but i dont know how to move to ShowDebugInformation Menu.
       can i find it in  the SAP Business One Tool. or do i need
    to check any data base help given by B1(Ex:- REFDB2004).
        plz give answer for  this also............
      with regards,
    santh

  • How to get the status of a window?

    Is there a way to get the status of a display window? I'm looking specifically for whether or not it is open and what image is being displayed in it.
    If there is no easy way to do this, can it be added to the list of suggestions for the next version?

    Right now there is no way to determine these attributes from software. When I went to enter a suggestion to R&D, I found that a very similar one was submitted recently. I added your suggestions to the current one. I'm sorry there isn't an easy solution.
    Kyle V.

  • How to get the Share Name in windows using java...

    Hi....
    i want to get the Share names of the shared folders in windows.
    I used the command line tool "net share" to get it .But i can't extract the
    share names correctly if the share name contains space.
    Regards
    ~ Suresh G

    Of course there is, if the user running it has "root" privileges (actually root userid or groupid if the permissions have been changed), but if you are going to do that, then why use the lookup at all, simply hardcode it in the program.
    If it is because you don't know how to do it, then I would say to find someone you know who can show you how. That is infinately easier than trying to explain the structure and purpose of the hosts file to you here.

  • How can get the library items total file size

    Hi All,
    I want to get the total file size of the library and count how many file in library.
    would I use getItemsRequest can get them?
    or have another ways to do that?
    Thank You
    Jimmy

    Sorry, I don't have any ideas.
    Just so you know, the document management support is the lowest priority.
    There are not any active enhancements planned for document management.
    We added some support in 12.0.x for WebAccess, but there is none planned
    further.
    Preston
    >>> On Tuesday, August 21, 2012 at 2:26 AM,
    jimmyng25<[email protected]> wrote:
    > Thank you, Preston.
    > I will try to find other ways.
    > Would you please telling me if you have any idea?
    > I no idea to solve that, thank you very much.
    >
    > Jimmy

  • How to get the inbox items in IC WEB CLIENT

    hi,
    Is there any function module to get the emails present in inbox in IC WEB CLIENT.
    Message was edited by:
            neelima m

    IC WebClient processes Email using SAPConnect component .There are certain configurations need to take place on groupware integration like SMTP configuration and Inbox settings on IC WebClient .
    Please follow the instructions given in the document which is available on SAP Note 82653
    Thanks,
    Thirumala.

Maybe you are looking for