Question

I'm opening Outlookelements with the shown Code (scroll down; C# Code). Sometimes the elements don't come to front so you first have to select them. Any idea how to do this? I thought about the handle and doing this by hand.

Other idea's?

Thanks Thomas

MAPIFolder objFolder = new ApplicationClass().GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderNotes);
                foreach (NoteItem note in objFolder.Items)
                    note.Display(false);
Was it helpful?

Solution

If you are calling from another app you will have to handle the Hwnd, you can do this via Win API calls or you can use Redemption's SafeInspector which which has an Handle property.

Here is a link how to get the hWnd via WinApi http://theflaker.com.ar/blog/?p=10

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top