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

Advanced Search Behavior



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 1st 07, 09:20 PM posted to microsoft.public.outlook.program_vba
Wild Bill
external usenet poster
 
Posts: 13
Default Advanced Search Behavior

First, forgive me if this is a repost. At least some servers did not
pick it up yesterday. Second, this is a rather mundane question, so one
of you other experts is welcome to take it and give Sue, Michael and Ken
a break, for the countless hours they volunteer here!

Below I attempt a search that should succeed, which returns
results.count=0.
Then I attempt a search that should fail; it returns results.count=0.
Then I try to search folder "Deleted Items" which always gives "The
Operation Failed" and Err numbers that vary wildly, though apparently
always negative, e.g. -1386805681, -1352202673, -1317599665 (It does
seem that it's been decreasing as the evening has progressed??!!).

The 1st and 3rd answers bewilder me, and I hoped you could help. BTW, I
am ignorant about "urn:schemas" and confess to have snagged this from
other n/g posts; I assume that it lets me search the subject field.
Worse yet, this is my first time using AdvancedSearch so forgive my
ignorance. I am clear on using Application_AdvancedSearchComplete as
sometimes shown in the n/g, but want to be comfortable with the above
questions first.

OL03. Both noted folders have items as I run this. Neither has a
subfolder.

Sub testSearch()
Dim objSch As Search, strF As String

strF=Chr(34) & "urn:schemas:httpmail:subject"" like 'News'"
Set objSch = Application.AdvancedSearch _
(Scope:="Inbox", Filter:=strF, SearchSubFolders:=True) 'should work
Debug.Print objSch.Results.Count

strF=Chr(34) & "urn:schemas:httpmail:subject"" =
'ToStringTheImpossibleString'"
Set objSch = Application.AdvancedSearch _
(Scope:="Inbox", Filter:=strF, SearchSubFolders:=True) 'should fail
Debug.Print objSch.Results.Count

Set objSch = Application.AdvancedSearch _
(Scope:="Deleted Items", Filter:=strF, SearchSubFolders:=True)
End Sub
  #2  
Old August 1st 07, 09:43 PM posted to microsoft.public.outlook.program_vba
Wild Bill
external usenet poster
 
Posts: 13
Default Advanced Search Behavior

I am attempting the cancel a repost of this topic (and being the same
subject, hope it doesn't zap the original, arggh). Please forgive the
interruption.
 




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
Advanced Search in Outlook 2007 TBO Outlook - Using Contacts 1 July 24th 07 11:29 PM
Can't save search in advanced find skeddy Outlook - General Queries 1 June 22nd 07 12:55 AM
use advanced search to find emails vonClausowitz Outlook and VBA 0 June 10th 07 11:24 PM
save advanced search smokiibear Outlook - General Queries 4 March 22nd 07 01:27 AM
Advanced Find & Local Domain search AndyH Outlook - General Queries 0 January 17th 07 09:45 AM


All times are GMT +1. The time now is 11:31 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.