[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Duplicates in outlook

Subject: Duplicates in outlook
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Mon, 25 Sep 2000 17:00:58 -0400 (EST)
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.