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

AdvancedSearch Method



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 6th 06, 11:29 PM posted to microsoft.public.outlook.program_vba
Irene
external usenet poster
 
Posts: 10
Default AdvancedSearch Method

Am I able to use the AdvancedSearch Method from the Outlook object in MS
Word VBA?
Thanks,

Ads
  #2  
Old December 7th 06, 12:06 AM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default AdvancedSearch Method

Sure. You might trip the security if you access any restricted properties or
methods, for example Send, since you're not running in-process with Outlook
as Outlook VBA. Any application that can use Outlook automation can code
with Outlook methods, properties and events.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Irene" wrote in message
...
Am I able to use the AdvancedSearch Method from the Outlook object in MS
Word VBA?
Thanks,


  #3  
Old December 7th 06, 11:00 PM posted to microsoft.public.outlook.program_vba
Irene
external usenet poster
 
Posts: 10
Default AdvancedSearch Method

Thanks,

When i use the AdvancedSearch Method in Outlook at insert "Private Sub
Application_AdvancedSearchComplete(ByVal SearchObject As Search) " Function
in the ThisOutlookSession, where should i insert it if i use Word as my
application?

Irene

"Ken Slovak - [MVP - Outlook]" wrote:

Sure. You might trip the security if you access any restricted properties or
methods, for example Send, since you're not running in-process with Outlook
as Outlook VBA. Any application that can use Outlook automation can code
with Outlook methods, properties and events.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Irene" wrote in message
...
Am I able to use the AdvancedSearch Method from the Outlook object in MS
Word VBA?
Thanks,



  #4  
Old December 8th 06, 12:02 AM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default AdvancedSearch Method

In your Word code put this at class module level:

Private WithEvents oOL As Outlook.Application

That will let you view the template for that event handler. Of course you
need a reference to Outlook in your Word project. Use WithEvents for any
object declaration when you want to handle events. It must be in a class or
form module and that class or form has to have scope throughout the life of
your application.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Irene" wrote in message
...
Thanks,

When i use the AdvancedSearch Method in Outlook at insert "Private Sub
Application_AdvancedSearchComplete(ByVal SearchObject As Search) "
Function
in the ThisOutlookSession, where should i insert it if i use Word as my
application?

Irene


 




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
Type of object for AdvancedSearch Renjith Outlook and VBA 4 May 17th 06 03:13 PM
Scope Parameter for AdvancedSearch Renjith Outlook - General Queries 1 May 12th 06 05:58 PM
Scope Parameter for AdvancedSearch Renjith Outlook - Using Contacts 1 May 12th 06 03:42 PM
AdvancedSearch Method in Exchange Server environment Howard Outlook and VBA 5 April 26th 06 07:55 PM
AdvancedSearch Serg Flic Outlook and VBA 1 January 10th 06 04:17 PM


All times are GMT +1. The time now is 05:45 AM.


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