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

Use of AdvancedSearch with wildcards in Outlook



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 8th 07, 02:21 AM posted to microsoft.public.outlook.program_vba
ed
external usenet poster
 
Posts: 114
Default Use of AdvancedSearch with wildcards in Outlook

I have been trying to build a search routine that will open the inbox and
cycle through the body of each message looking for a string that I define
using wild cards and the Like operator.

Here is the code snippet:

------------------------
Do While n filecount
Set myitem1 = myFolder.Items(n) 'iterate through items in inbox

' send (myitem1) to a string search
Dim objSch As Search 'name of the search obj result
Const strF As String = "myItem1.body" Like "*@*" 'the actual search
string
Const strS As String = "myItem1" 'where to look for the search string
Const strTag As String = "AddressSearch" 'search name tag

'On Error Resume Next
Set objSch = Application.AdvancedSearch(Scope:=strS, Filter:=strF,
Tag:=strTag)

--------------

Can't get this advancedSearch to run; get automation errors. suspect that
the search string is tripping up the search call.

Can you suggest anything? Is is OK to use the Like operator in
advancedSearch?



 




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
wildcards in rules no spam Outlook - General Queries 12 March 6th 07 04:23 AM
AdvancedSearch Method Irene Outlook and VBA 3 December 8th 06 12:02 AM
Creating an Outlook Task Add-in Solution using AdvancedSearch in C Tom_in_Atlanta Add-ins for Outlook 2 September 12th 06 03:14 AM
Scope Parameter for AdvancedSearch Renjith Outlook - General Queries 1 May 12th 06 05:58 PM
AdvancedSearch Serg Flic Outlook and VBA 1 January 10th 06 04:17 PM


All times are GMT +1. The time now is 09:00 PM.


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.