AdvancedSearch producing "a folder by that name already exists" RT

G

Guest

Hello all,

This is a strange question that's been vexing me for a couple of days. As
described below in my Search.Results.Count variable changing, I'm searching a
ton of e-mail using Advanced Search from the top-level of individual stores
(.pst files) with SearchSubfolders = True.

No matter how I try, I'm getting the following error message at the
execution of the AdvancedSearch statement:

"A folder by this name already exists"

The RunTime error number is a long number that is different each execution.
I run SacnPST.exe, to no avail. Another freaky connection is if I try to to a
regular advanced find (from the outlook explorer), when I click the Find Now
button, I get:

"There are too many Find Public Folders dialogs open. You must close them in
order to use the Advanced Find. Do you want to close them now?"

No matter what I answer (Yes or No), I get the following:

"Outlook cannot perform your search. Outlook cannot display this view. A
folder by that name already exists."

I presume they're connected in some bizarre way.

There is nothing special about these folders. There are no custom/special
view options that I can find. I've tried renaming the store, the .pst file,
copying from an Outlook 2002 version .pst to an Outlook 2003 blank .pst, etc.

The last thing I'm going to try is recursing through the first level of
folder in the pst and running my advanced searches from that 'scope' instead
of the top of the store.

This is sorta bizarre. It's as if the AdvancedSearch is creating something
somewhere that I can't get rid of. Or there's a conflict with the structure
of the .pst (it's just a bunch of mail items).


Many, many, thanks in advance, and happy new year to all,
Paul
 
G

Guest

OK. The problem is me.

The scope of an AdvancedSearch does not like the name of a top-level store.
It seems to take a folder name IN only the default store. How do I get it to
look in multiple .pst's (separately, I know you can't search across multiple
..pst's)...


Thanks in advance,
Paul
 
S

Sue Mosher [MVP-Outlook]

Do you have a copy of Outlook Spy? I wonder if the repeated applications of
AdvancedSearch are caching the searches and thus creating hidden items.
Outlook Spy would be a good tool to investigate this with.
 
M

Marc

Hi,

I have a copy of your book, which is very good. There don't see to be
many books on Outlook VBA.

I had a quick question: I'm trying to archive all of my December
e-mails in a certain folder. Outlook archives most of the files OK,
but there are a bunch that it will not arvhive. These seem to be the
latest dates, December 24-31. Have any ideas?

Thanks

- Marc
 
S

Sue Mosher [MVP-Outlook]

This has nothing to do with Outlook VBA, does it? You should post such
questions in microsoft.public.outlook.general.

The items probably aren't old enough to be archived. Archiving works with
the Modified date.
 
G

Guest

Sue,

I gave up. After tearing my hair out for a couple of days, the client wants
it done. I switched to a combo of restrict (to get messages in a date range),
and then looping thru the items doing InStr()'s on the subject and body.

I've tried OnLine vs. OffLine, different PST's, copying e-mails to a newly
created PST, Detect and Repair, Re-Installing Office, all with no luck. There
seems to be no rhyme or reason, and one a folder gets stuck, you can never
pass it as a scope to an AdvancedSearch again. It's definitely ingrained into
the PST file somehow.

On an off topic, not allowing to read the body of an e-mail is totally
absurd. I am amazed. What a pain in the tail.

Thanks again for the help. The book's invaluable.
Paul

Sue Mosher said:
Do you have a copy of Outlook Spy? I wonder if the repeated applications of
AdvancedSearch are caching the searches and thus creating hidden items.
Outlook Spy would be a good tool to investigate this with.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top