• Programmatically create reminders/tasks (A2k)

    Home » Forums » AskWoody support » Productivity software by function » MS Outlook and email programs » Programmatically create reminders/tasks (A2k)

    Author
    Topic
    #430333

    I deal with many classes graduating on forecast dates. I would like to input a task or reminder saying Class XXXX-01 Graduate, set the date, and then have outlook auto-populate tasks backwards from that point (i.e. 7 days before graduation, create certificates; 14 days before graduation, verify personal information; etc…)

    How can I do this?

    Viewing 0 reply threads
    Author
    Replies
    • #1004465

      With a lot of VBA code, or a custom Task Form, or both. yep (I’m not being sarcastic. Outlook Tasks are not very powerful, probably because MS didn’t want to step on the toes of its Project application.)

      If you want to use Tasks, search for ‘TaskItem” in this Forum and the Lounge VBA Forum. It could also be worth your time to search http://www.Outlookcode.com[/url%5D.

      • #1004526

        John,
        Thanks for your advice, but I’m completely at a loss. I have NO clue whatsoever as to where to begin. Outlook forms aren’t like Access forms (which are the only ones I have experience with), so I don’t even know where to start. I was able to get to the “design” view for a custom task form, however once there it was Greek to me (and I don’t speak Greek groan). If anyone can give me some more basic advice on this advanced request, I’d appreciate it. Thanks!

        • #1004535

          I don’t do Outlook Forms myself. Let me attempt something in VBA which you can work on. Do you work at all in VBA?

          Oops, I see from your Access posts that you work in VBA. Welcome to the Outlook object model – any way you look at it, it sucks, partly because it’s a collage of interface and MAPI engine, and (I guess) partly because MS doesn’t expose it all because they are trying to prevent it being used as a spam or virus dissemination engine.

          • #1004563

            John,
            You made me chuckle with your statement “any way you look at it, it sucks”; I’ll check out what you’ve provided me tonight, and post back soon. Thanks so much for your help.

        • #1004556

          Assuming you are comfortable with the MS VBE interface, the attached zip file contains a very basic form with the code embedded in it. Import the form into the Outlook VBE, then add a caller to a standard module:

          Sub CreateGradClasstasks()
          frmClass_Task_Creator.Show
          End Sub

          Since you have some familiarity with VBA, I don’t think you’ll have problems adding additional tasks and information to the basics provided. You can probably improve the code a lot, and there isn’t any error handling except date validity checks.

          • #1004664

            John,
            What you’ve given me is exactly what I needed. I’ve been able to figure a little more out, thanks a lot!

            • #1004775

              PS., I couldn’t help but monkey with it for my own self-education. One thing, FWIW (first line unchanged):

              dateDue = DateAdd(“d”, -CInt(Split(strDaysPrior, “;”, -1, vbTextCompare)(intC)), txtGradDate)
              If Weekday(dateDue) = 1 Then dateDue = dateDue – 2 ‘ move Sun to preceding Fri
              If Weekday(dateDue) = 7 Then dateDue = dateDue – 1 ‘ move Sat to preceding Fri

              It would be nice to use the Calendar Control for date selection, but that’s out of my depth. If you build the original into something more powerful and not too narrow in use, please post it back to this thread for other Loungers.

    Viewing 0 reply threads
    Reply To: Programmatically create reminders/tasks (A2k)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: