Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    NY, NY, USA
    Posts
    654
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Macro to count Days at a particular office (Office 2003)

    Is there a macro to count how many days between two dates in Outlook that I have been say at office a or office b or office c etc.
    I can make any consistent entry in outlook to make the macro work.
    At the end of the year nice to know how many days I have spent in each office
    Thanks
    Jr Klein

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to count Days at a particular office (Office 2003)

    Why don't you keep track of where you work in an Excel workbook? No macros needed.

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    NY, NY, USA
    Posts
    654
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: Macro to count Days at a particular office (Office 2003)

    Hi Hans
    Normally this would seem the simpler approach. However my life is very complicated and schedule done in outlook. Just another step to open excel go to the spreadsheet and make certain to add the dates. If all in outlook "one stop shopping" and can easily go back and verify
    Jerome

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro to count Days at a particular office (Office 2003)

    I think <!profile=HansV>HansV<!/profile>'s point is that is may be easier to export your calendar to Excel by a CSV file, and do the calcs in there; that's how I'd do it.

    An Outlook macro won't be entirely trivial, and it may not be very fast as it will have to examine every Calender Item (assuming that's where your records are). In order to write it, we'd need to understand at least this information: are the "in-office" times in your Calendar? How does your Calendar show which office you are in, and is the office name used consistently? Are the items set up as All-Day events? How do you define year - do you want io input start and end dates? Are you looking for a count of days or hours?

    Since none of us Loungers is likely to have a test-bed of comparable items, you'll have to verify that the code works accurately. This could be done by creating a test Calendar with a limited number of items..
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to count Days at a particular office (Office 2003)

    Well, I actually meant entering the info directly in an Excel worksheet, but exporting the Outlook calendar to Excel could be a good way to do it.

Posting Permissions

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