[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Duplicates in outlook
I wrote this javascript a while ago when my outlook routing went up the spout and i was getting real duplicates in folders. It won't work in this case because the "RecievedTime" is different and the body doesn't match because of the footer but it might get you in the right direction (with modification) if you want to clean up your list. Or you might prefer to do it by hand. save the following to a dup.js execute as usual with cscript dup.js dup.js----------------------------------------------------------------- // debugger; var theApp = WScript.CreateObject("Outlook.Application"); var theNameSpace = theApp.GetNameSpace("MAPI"); theNameSpace.Logon( "profile", "password"); // (sic.) var fd = theNameSpace.Folders(1); // change this to the pst index if you need to doFolder(fd); function doFolder(fd){ if ("xsl-list" == fd.name){ var x=0; var i; for (i=1;i <= fd.Folders.count; i++){ doFolder(fd.Folders(i)); } var its = fd.items; if (its.Count > 1){ its.sort("[ReceivedTime]", 2); } for (i=its.count; i > 1; i--){ if (its(i).senderName == its(i-1).senderName && its(i).to == its(i-1).to && its(i).subject == its(i-1).subject && its(i).body == its(i-1).body // bodies won't match try id && its(i).body != ""){ its(i).Delete(); x++; } } WScript.Echo("Processed " + fd.name); WScript.Echo("Deleted items " + x); } } Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|