Consulting

Results 1 to 3 of 3

Thread: Run a script rule

  1. #1

    Run a script rule

    Hi,

    In an effort to become paperless, anything to do with purchase ledger, I want to make a script rule which sends to a sub folder, marks as certain category and saves attachment (90% of time PDF) in certain g:drive folder with a file naming convention.

    Sub folders:
    1. Direct
    2. PO
    3. Confirmation
    4. Delivery Notes
    5. Invoices
    6. Statements



    Categories:

    1. PO
    2. Confirmation
    3. Delivery Note
    4. Invoice
    5. Statement


    ;don't require a "Direct Category"

    I'm able to use normal outlook rules for move to folder and assign category.....there's about 30 indiv rules based on supplier name etc that achieve this.

    Had a look at some vba scripts but would I have to have 30 diff scripts to tag onto my 30 current move to folder/assign cat scripts. To assign the separate file name pathways?

    Or can I adapt a script that knows if a email hits "Invoice" it saves to Gmail\blah\blah\Invoices.

    Email hits Delivery Notes it saves to Gmail\blah\blah\Delivery Notes

    File naming Convention

    Date & Time received email and who supplier is. Joe Bloggs Ltd 17/09/21 11.34am

    Also a way of marking if any duplicate files Joe Bloggs Ltd 17/09/21 11.34am (2)

    Many Thanks
    Gareth

  2. #2
    See the code at http://www.vbaexpress.com/forum/show...eNameUnique%28 which should point you in the right direction.
    Note that 'Joe Bloggs Ltd 17/09/21 11.34am' contains illegal filename characters so cannot be used as a filename pattern .
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    Hi, thank you very much for the reply.

    Its more than a little over my head!

    So I have say 20 indiv outlook rules per Supplier which will put the email into my outlook subfolder "Invoices".

    Anything that hits "Invoices" sub folder I want the attachment saving in: G:\My Drive\Outlook attachments\Invoices

    Could you please help with code you sent a link to? (Tried to include it here but got an error and wouldn't let me post)

    Where do I specify my outlook invoices subfolder?

    Thanks

Posting Permissions

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