H
habib
Hi,
Any one know if there's method that search for a specific
string in the subject (not the exact subject)?
I tried Find method which give results only if the string
to look for and the subject match exactly.
I tried AdvancedSearch but I am getting an error, anything
wrong with my following code ?
/********************************/
var outlookApp = null;
var nameSpace = null;
var mailFolder = null;
var mailItem = null;
var subject = 'I will be'
var filter = "[Subject] = " + subject
outlookApp = WScript.CreateObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.Find(filter);
//filter = "urn:schemas:mailheader:subject LIKE " +
subject + "%"
//mailItem = outlookApp.AdvancedSearch("Inbox", filter);
mailItem.display(0);
WScript.DisconnectObject(outlookApp);
outlookApp = null;
WScript.Quit();
Any one know if there's method that search for a specific
string in the subject (not the exact subject)?
I tried Find method which give results only if the string
to look for and the subject match exactly.
I tried AdvancedSearch but I am getting an error, anything
wrong with my following code ?
/********************************/
var outlookApp = null;
var nameSpace = null;
var mailFolder = null;
var mailItem = null;
var subject = 'I will be'
var filter = "[Subject] = " + subject
outlookApp = WScript.CreateObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.Find(filter);
//filter = "urn:schemas:mailheader:subject LIKE " +
subject + "%"
//mailItem = outlookApp.AdvancedSearch("Inbox", filter);
mailItem.display(0);
WScript.DisconnectObject(outlookApp);
outlookApp = null;
WScript.Quit();