A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to get the focus from a folder or an item?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 22nd 06, 12:22 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default How to get the focus from a folder or an item?

Hello,

I`m searching for a method to get the focus of the actual selection.
How can I check if the folder (in the navigationpane) has the focus and
not one or more items? I want to different per code (VBA/API) if the
focus is set to a folder (so the code should work with all items in the
folder) or to 1 or more items.

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung

Ads
  #2  
Old October 22nd 06, 01:34 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default How to get the focus from a folder or an item?

Ok, not longer important for me - I show a dialog to select, what the
user want to do.

Thanks
Peter

Peter Marchert schrieb:

Hello,

I`m searching for a method to get the focus of the actual selection.
How can I check if the folder (in the navigationpane) has the focus and
not one or more items? I want to different per code (VBA/API) if the
focus is set to a folder (so the code should work with all items in the
folder) or to 1 or more items.

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


  #3  
Old October 23rd 06, 06:24 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default How to get the focus from a folder or an item?

Am 22 Oct 2006 04:22:45 -0700 schrieb Peter Marchert:

Peter, you would have to use some Win32 APis. First you must get the handle
for the windows (NetUIHWND class for the navi pane, SUPERGRID class for the
explorer). Then you call the API GetFocus to get the handle of the window
with the focus and compare that value with the other ones.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Hello,

I`m searching for a method to get the focus of the actual selection.
How can I check if the folder (in the navigationpane) has the focus and
not one or more items? I want to different per code (VBA/API) if the
focus is set to a folder (so the code should work with all items in the
folder) or to 1 or more items.

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung

  #4  
Old October 23rd 06, 07:51 AM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default How to get the focus from a folder or an item?

Hi Michael,

thanks for your answer. Perhaps I need this in a future funciton.

Peter

Michael Bauer [MVP - Outlook] schrieb:

Am 22 Oct 2006 04:22:45 -0700 schrieb Peter Marchert:

Peter, you would have to use some Win32 APis. First you must get the handle
for the windows (NetUIHWND class for the navi pane, SUPERGRID class for the
explorer). Then you call the API GetFocus to get the handle of the window
with the focus and compare that value with the other ones.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Hello,

I`m searching for a method to get the focus of the actual selection.
How can I check if the folder (in the navigationpane) has the focus and
not one or more items? I want to different per code (VBA/API) if the
focus is set to a folder (so the code should work with all items in the
folder) or to 1 or more items.

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to move focus/selection to a particular contact/item in Explor va Outlook and VBA 1 September 28th 06 11:31 PM
Copy mail item to one folder and then move it to another folder LDMueller Outlook - Using Forms 1 September 15th 06 03:15 PM
Copying an item from one folder to another Laughing John Outlook and VBA 4 June 14th 06 12:46 PM
Forwarding a mail from your sent item folder [email protected] Outlook - General Queries 0 March 22nd 06 06:13 PM
how do i get an item into my calendar folder EC Outlook - Calandaring 1 March 13th 06 01:16 AM


All times are GMT +1. The time now is 03:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.