Results 1 to 2 of 2

Thread: Saving GroupWise Report attachments to a directory

  1. #1

    Saving GroupWise Report attachments to a directory

    Register for a FREE account, and/
    or Log in to avoid these ads!

    The code from the original article Extract Novell Groupwise Attachments And Save To A Directory works great.

    I was hoping someone could post a modification that would allow the script to save non-uniquely named attachments with a unique name.
    Specifically, GroupWise sends a daily accounting report to the postmaster as an attachment "acct" with no extension. (There are other reports like GWCHECK that similarly are sent as non-uniquely named attachments without extensions).

    I have several months worth of daily report emails, each with a single "acct" attachment, in a mailbox folder. As it stands, If I specify no extension using sFileType = "" the script does run through each email and saves the acct file to the specified local directory, but since all the attachments are the same name, the script simply overwrites as it saves the files to the specified directory.

    Can anyone add a couple lines that would allow the script to save attachments with duplicate names as files with unique names and append a file extension. It can be as simple as appending a three digit identifier and a .txt extentsion - acct001.txt acct002.txt acct003.txt



  2. #2
    Acolyte gsnidow's Avatar
    Join Date
    Aug 2011
    Frank, I don't want to jump in on Ken's code here, but it looks like you could make a simple modification to this part...
                    If Right(.Attachments(i).Filename, len(sFileType)) = sFileType Then
                        .Attachments(i).Save _
                            sSavePath & "\" & .Attachments(i).Filename
                    End If
    If you just want to add an increment count and a .txt extention, then you already have that in the loop variable 'i". You could try changing the sSavePath line to something like this...
    sSavePath & "\" & .Attachments(i).Filename & "_" & i & ".txt"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts