[pmmail-list] exporting address book

J Seder pmmail-list@blueprintsoftwareworks.com
Thu, 03 Apr 2003 16:26:24 -0800


>Hi,
>Is it possible to export the contents of just 1 of my 3 address books to a text file?  
>
>Thanks
>John

This Rexx program exports your address book to a text file with the address book name 
included as a column.  You can easily edit the result - or you could modify this program.  
You might need to edit the input path - I have installed PMMail under c:\tools:

/* Parse the address book */
addrdb = 'c:\tools\tools\addr.db'
bookdb = 'c:\tools\tools\books.db'
books.0 = 0
dm = 'DE'x
do forever       /* Load up the list of address books */
   if lines(bookdb)=0 then leave
   b = linein(bookdb)
   parse var b bookname (dm) i1 (dm) i2 (dm) i3 (dm)  rest
   books.i3 = bookname
   if i3>books.0 then books.0 = i3
   end
err = stream(bookdb,'C','CLOSE')
do forever       /* Load up the user id table */
   if lines(addrdb)=0 then leave
   b = linein(addrdb)
   parse var b email  (dm)  alias  (dm)  realname  (dm)  popupflag  (dm)  ,
      company  (dm)  title  (dm)  homestreet  (dm)  homebldg  (dm)  homecity  (dm) ,
      homest  (dm)  homezip  (dm)  homephone  (dm)  homeext  (dm)  homefax  (dm)  ,
      bizstreet  (dm)  bizbldg  (dm)  bizcity  (dm)  bizst  (dm)  bizzip  (dm)  ,
      bizphone  (dm)  bizext  (dm)  bixfax  (dm)  notes  (dm)  book  (dm),
      homectry  (dm)  bizctry
   say left(realname,max(30,length(realname)),' '),
       left(email,max(30,length(email)),' '),
       left(alias,max(10,length(alias)),' ') books.book
   end
err = stream(addrdb,'C','CLOSE')



- pmmail-list - The PMMail Discussion List ---------------------------
To POST to the list, send your message to:
pmmail-list@blueprintsoftwareworks.com

To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com 
with the first line of the message body being...
UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------