2 special macros in O2K

  • Thread starter Thread starter Moshe Epstein
  • Start date Start date
M

Moshe Epstein

Hi, all

For some time now I'm trying to create the following 2 macros in O2K with no
success at all/

1) After I select a set of messages or a whole folder, I'd like the macro to
create a text file (like ".csv") with the name of the forlder and, on each
line, write down the subject of the message and all the links in it starting
with "http" or "www" (but not anything else) - preferrably one line for each
link.

2) As my Personal Folders file was growing up fast, I decided to divide it
and create individual files for each major subject (like: professional,
friends, personal, etc.). For each of them OL creates a "Deleted Items"
folder. For the main file, we have a button that can "Empty deleted items
folder" and, after that, right-clicking the "Outlook Today" button and
choosing "Properties>Advanced>Compact now", it's possible to compact the
folder, thus reducing the physical size of the file. If I right-click the
"Deleted Items" folder on any of the secondary files, I get the "empty
deleted items folder"; after clicking it, I can right-click the secondary
folder and choose "Properties>Advanced>Compact now", thus reducing its size.
The macro I'm trying to create would perform those actions for any given
folder, by just selecting the main folder for the file and activating the
macro.

Can anyone help me with those macros, or does anyone have any idea how to do
it?

TIA
Moshe
 
1) This is do-able, but the horribly complex part is parsing the contents of
the message body and looking for individual strings that are hyperlinks.
For plain text messages, you'd have to loop through the body using InStr
functions, and mark the end of each http:// or www. string to continue the
loop until no more are found. This might be easier with HTML messages, as
you can look for tags like <A HREF = "http://www.microsoft.com">, but it is
still non-trivial. The easy part is using the TextStream object from the
Microsoft Scripting Runtime library to create the .csv file.

2) PST compacting functions are not exposed to the Outlook Object Model and
cannot be automated.
 
Thnx a lot, Eric.
I'll try what you suggested for (1).
Pitty (2) isn't do-able - it would save a lot of clicks and mouse-mileage
:-)

--
------------------------------------------------------------
TIA
Moshe Epstein
Software, SQA, Integration
& Testing Engineer
 
Back
Top