473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Outlook AdvancedSearch crashing with COMException

I am posting this here since I don't see an Outlook programming group
specific to .net but only VBA. Please let me know if I'll have better
luck posting elsewhere.

I am writing a VB.NET application that interfaces with Outlook 2003 via
Microsoft.Office.Interop.Outlook.dll. I am calling AdvancedSearch
which with some folder scopes works fine, but with others crashes with
an unhelpful error of:

System.Runtime.InteropServices.COMException (0xF9B7064F): The operation
failed.

Which is thrown at the call of AdvancedSearch.

If I specify a scope of Inbox or 'Inbox' it works fine and searches my
Inbox. If I search for a folder name that doesn't exist I get the
above mentioned error. If I search for any valid sub folder though, I
also get the same error. It makes no difference how I quote the folder
name or if I use the full path. Sometimes however, and I can't
determine what makes a difference, it works as it should. Any ideas
what this is? I can verify that my connection to outlook is fine since
I can read messages and folder contents, just search is failing.

Thank you for any suggestions..
- Matt

Dec 27 '05 #1
2 1879
I seem to have solved this by specifying the full path beginning with
\\ such as:

'\\Personal Folders\Folder One\Folder Two'

- Matt

Dec 27 '05 #2

<ms******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I seem to have solved this by specifying the full path beginning with
\\ such as:

'\\Personal Folders\Folder One\Folder Two'


Yes, Outlook is rather weird but it can be programmed OK.

Jan 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bassel Tabbara | last post by:
I wrote the following code: oApp = new Outlook.Application(); oApp = new Outlook.Application(); oNameSpace= oApp.GetNamespace("MAPI"); oNameSpace.Logon(null,null,true,true); //gets defaultfolder...
1
by: John Smith | last post by:
Hi, I'm trying to send email in our C# ASP.Net application using the Outlook 11 library. For a bunch of unimportant reasons (unimportant to this posting that is) we have to do it this way and...
4
by: John | last post by:
Hi Does anyone have a vb.net example of how to use redemption to send mail through outlook? Many Thanks Regards
4
by: Saurabh Sharma | last post by:
Hi I am reading all the mails from a particular outlook folder. I have to check whether i have read the mail earlier or not which i am doing by checking id of mail provided by outlook. Problem...
3
by: Saurabh Sharma | last post by:
Hi "\http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TestField\" <> 'Value'"; This fileter in while using Outlook Advance search should give all those mails...
1
by: Crash | last post by:
I am having a tough time finding documentation on DASL! 1) What the heck does DASL stand for - I can't even find any documentation on that? Anyway, I would like to integrate a DASL query into my...
3
by: mwolowski | last post by:
Hello, I'd like to add tasks, appointments, etc using c# to outlook For example i added reference using OutLook = Microsoft.Office.Interop.Outlook; and the code: 1. ---------------------...
1
by: Mike P | last post by:
I am using Outlook MailItem to reference emails in the local inbox, but I need to refer to the sender's email and the received by email and they do not seem to be accessible in the MailItem object....
1
by: chrisli | last post by:
Hey, i have written this code to read all Outlook Appointments from another user and fill them into my DGV. Public Sub ReadOtherUserAppointment(ByVal UserName As String) Dim objolApp...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.