Scan / Update Uncompleted Tasks

Status
Not open for further replies.
K

KitCaz

Hi there!

I'm having an issue with my phone and it's interface with my tasks, it's

deleting my reminders.

So until that's resolved I want to stop the bleeding. I'm reasonably good

at VBA in Access but not Outlook, so I need a little help. My goal:

On opening Outlook, I'd like a VBA procedure to scan all of my non-completed

Tasks, updating the Reminder Date from the Due Date (Due Date not being

compromised).

I've Googled myself silly but all the code snippets I find are a shade too

fragmented for me to plug them in. Anyone have a VBA bone they can throw me?

Chris
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Your function must be called from the Application_Startup event, which is

called by Outlook at startup.

See the GetDefaultFolder function to get a reference to your default task

folder. The returned folder object has an Items collection, through which

you can loop. Then for each TaskItem object set its ReminderTime =DueDate,

and ReminderSet=True, then call Save.

Best regards

Michael Bauer

Am Mon, 21 Sep 2009 13:23:01 -0700 schrieb KitCaz:


> Hi there!

> I'm having an issue with my phone and it's interface with my tasks, it's
> deleting my reminders.

> So until that's resolved I want to stop the bleeding. I'm reasonably good
> at VBA in Access but not Outlook, so I need a little help. My goal:

> On opening Outlook, I'd like a VBA procedure to scan all of my


non-completed
> Tasks, updating the Reminder Date from the Due Date (Due Date not being
> compromised).

> I've Googled myself silly but all the code snippets I find are a shade too
> fragmented for me to plug them in. Anyone have a VBA bone they can throw


me?

> Chris
 
K

KitCaz

Michael, thank you.

So I opened Outlook, pressed F11 to reveal the VB, expanded Microsoft Office

Outlook, selected ThisOutlookSession, then created this sub, just to see if I

was on the right track, saved, closed OL, and reopened, but didn't see any

msg box. What am I doing wrong?:

Private Sub Application_Startup()

Dim ol As New Outlook.Application

Dim olns As Outlook.NameSpace

MsgBox olns.GetDefaultFolder(olFolderTasks).Name

End Sub

"Michael Bauer " wrote:



> Your function must be called from the Application_Startup event, which is
> called by Outlook at startup.

> See the GetDefaultFolder function to get a reference to your default task
> folder. The returned folder object has an Items collection, through which
> you can loop. Then for each TaskItem object set its ReminderTime =DueDate,
> and ReminderSet=True, then call Save.

> > Best regards
> Michael Bauer

> > >

> Am Mon, 21 Sep 2009 13:23:01 -0700 schrieb KitCaz:
>
> > Hi there!
> > I'm having an issue with my phone and it's interface with my tasks, it's
> > deleting my reminders.
> > So until that's resolved I want to stop the bleeding. I'm reasonably good
> > at VBA in Access but not Outlook, so I need a little help. My goal:
> > On opening Outlook, I'd like a VBA procedure to scan all of my

> non-completed
> > Tasks, updating the Reminder Date from the Due Date (Due Date not being
> > compromised).
> > I've Googled myself silly but all the code snippets I find are a shade too
> > fragmented for me to plug them in. Anyone have a VBA bone they can throw

> me?
> > Chris

>
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Don't create a new instance of Outlook as it is already running, instead use

the available Application object. Then, you have forgotten to set the olns

variable to anything. This should work:

Private Sub Application_Startup()

Dim olns As Outlook.NameSpace

set olns=Application.Session

MsgBox olns.GetDefaultFolder(olFolderTasks).Name

End Sub

Best regards

Michael Bauer

Am Tue, 22 Sep 2009 08:43:02 -0700 schrieb KitCaz:


> Michael, thank you.

> So I opened Outlook, pressed F11 to reveal the VB, expanded Microsoft


Office
> Outlook, selected ThisOutlookSession, then created this sub, just to see


if I
> was on the right track, saved, closed OL, and reopened, but didn't see any
> msg box. What am I doing wrong?:

> Private Sub Application_Startup()

> Dim ol As New Outlook.Application
> Dim olns As Outlook.NameSpace

> MsgBox olns.GetDefaultFolder(olFolderTasks).Name

> End Sub

> "Michael Bauer " wrote:
>
>

>
>> Your function must be called from the Application_Startup event, which is
> > called by Outlook at startup.
>

>> See the GetDefaultFolder function to get a reference to your default task
> > folder. The returned folder object has an Items collection, through which
> > you can loop. Then for each TaskItem object set its ReminderTime


=DueDate,
> > and ReminderSet=True, then call Save.
>

>> > > Best regards
> > Michael Bauer
>

>> >> >>

>

>
>> Am Mon, 21 Sep 2009 13:23:01 -0700 schrieb KitCaz:
> >
> >> Hi there!
> >
>>> I'm having an issue with my phone and it's interface with my tasks, it's
> >> deleting my reminders.
> >
>>> So until that's resolved I want to stop the bleeding. I'm reasonably


good
> >> at VBA in Access but not Outlook, so I need a little help. My goal:
> >
>>> On opening Outlook, I'd like a VBA procedure to scan all of my

> > non-completed
> >> Tasks, updating the Reminder Date from the Due Date (Due Date not being
> >> compromised).
> >
>>> I've Googled myself silly but all the code snippets I find are a shade


too
> >> fragmented for me to plug them in. Anyone have a VBA bone they can


throw
> > me?
> >
>>> Chris

> >
 
K

KitCaz

Thanks in advance for your patience. So if I applied the change you

mentioned, why don't I get a msgbox pop up on startup? This is what I have:

Private Sub Application_Startup()

Dim olns As Outlook.NameSpace

Set olns = Application.Session

MsgBox olns.GetDefaultFolder(olFolderTasks).Name

End Sub

"Michael Bauer " wrote:



> Don't create a new instance of Outlook as it is already running, instead use
> the available Application object. Then, you have forgotten to set the olns
> variable to anything. This should work:

> Private Sub Application_Startup()

> Dim olns As Outlook.NameSpace
> set olns=Application.Session
> MsgBox olns.GetDefaultFolder(olFolderTasks).Name

> End Sub

> > Best regards
> Michael Bauer

> > >

> Am Tue, 22 Sep 2009 08:43:02 -0700 schrieb KitCaz:
>
> > Michael, thank you.
> > So I opened Outlook, pressed F11 to reveal the VB, expanded Microsoft

> Office
> > Outlook, selected ThisOutlookSession, then created this sub, just to see

> if I
> > was on the right track, saved, closed OL, and reopened, but didn't see any
> > msg box. What am I doing wrong?:
> > Private Sub Application_Startup()
> > Dim ol As New Outlook.Application
> > Dim olns As Outlook.NameSpace
> > MsgBox olns.GetDefaultFolder(olFolderTasks).Name
> > End Sub
> > "Michael Bauer " wrote:
> >
> >
> >
> >> Your function must be called from the Application_Startup event, which is
> >> called by Outlook at startup.
> >
> >> See the GetDefaultFolder function to get a reference to your default task
> >> folder. The returned folder object has an Items collection, through which
> >> you can loop. Then for each TaskItem object set its ReminderTime

> =DueDate,
> >> and ReminderSet=True, then call Save.
> >
> >> > >> Best regards
> >> Michael Bauer
> >
> >> > >> > >>

> >
> >
> >> Am Mon, 21 Sep 2009 13:23:01 -0700 schrieb KitCaz:
> >
> >>> Hi there!
> >>
> >>> I'm having an issue with my phone and it's interface with my tasks, it's
> >>> deleting my reminders.
> >>
> >>> So until that's resolved I want to stop the bleeding. I'm reasonably

> good
> >>> at VBA in Access but not Outlook, so I need a little help. My goal:
> >>
> >>> On opening Outlook, I'd like a VBA procedure to scan all of my
> >> non-completed
> >>> Tasks, updating the Reminder Date from the Due Date (Due Date not being
> >>> compromised).
> >>
> >>> I've Googled myself silly but all the code snippets I find are a shade

> too
> >>> fragmented for me to plug them in. Anyone have a VBA bone they can

> throw
> >> me?
> >>
> >>> Chris
> >>

>
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Check your security settings, probably VBA isn't running at all:

Tools/Macros/Security.

Best regards

Michael Bauer

Am Mon, 28 Sep 2009 07:49:01 -0700 schrieb KitCaz:


> Thanks in advance for your patience. So if I applied the change you
> mentioned, why don't I get a msgbox pop up on startup? This is what I


have:

> Private Sub Application_Startup()

> Dim olns As Outlook.NameSpace
> Set olns = Application.Session
> MsgBox olns.GetDefaultFolder(olFolderTasks).Name

> End Sub

> "Michael Bauer " wrote:
>
>

>
>> Don't create a new instance of Outlook as it is already running, instead


use
> > the available Application object. Then, you have forgotten to set the


olns
> > variable to anything. This should work:
>

>> Private Sub Application_Startup()
>

>> Dim olns As Outlook.NameSpace
> > set olns=Application.Session
> > MsgBox olns.GetDefaultFolder(olFolderTasks).Name
>

>> End Sub
>

>> > > Best regards
> > Michael Bauer
>

>> >> >>

>

>
>> Am Tue, 22 Sep 2009 08:43:02 -0700 schrieb KitCaz:
> >
> >> Michael, thank you.
> >
>>> So I opened Outlook, pressed F11 to reveal the VB, expanded Microsoft

> > Office
> >> Outlook, selected ThisOutlookSession, then created this sub, just to see

> > if I
> >> was on the right track, saved, closed OL, and reopened, but didn't see


any
> >> msg box. What am I doing wrong?:
> >
>>> Private Sub Application_Startup()
> >
>>> Dim ol As New Outlook.Application
> >> Dim olns As Outlook.NameSpace
> >
>>> MsgBox olns.GetDefaultFolder(olFolderTasks).Name
> >
>>> End Sub
> >
>>
>>> "Michael Bauer " wrote:
> >
>>>
>>>
>>>> Your function must be called from the Application_Startup event, which


is
> >>> called by Outlook at startup.
> >>
>>>> See the GetDefaultFolder function to get a reference to your default


task
> >>> folder. The returned folder object has an Items collection, through


which
> >>> you can loop. Then for each TaskItem object set its ReminderTime

> > =DueDate,
> >>> and ReminderSet=True, then call Save.
> >>
>>>> > >>> Best regards
> >>> Michael Bauer
> >>
>>>> >>>> >>>>

> >>
>>>
>>>> Am Mon, 21 Sep 2009 13:23:01 -0700 schrieb KitCaz:
> >>
>>>>> Hi there!
> >>>
>>>>> I'm having an issue with my phone and it's interface with my tasks,


it's
> >>>> deleting my reminders.
> >>>
>>>>> So until that's resolved I want to stop the bleeding. I'm reasonably

> > good
> >>>> at VBA in Access but not Outlook, so I need a little help. My goal:
> >>>
>>>>> On opening Outlook, I'd like a VBA procedure to scan all of my
> >>> non-completed
> >>>> Tasks, updating the Reminder Date from the Due Date (Due Date not


being
> >>>> compromised).
> >>>
>>>>> I've Googled myself silly but all the code snippets I find are a shade

> > too
> >>>> fragmented for me to plug them in. Anyone have a VBA bone they can

> > throw
> >>> me?
> >>>
>>>>> Chris
> >>>

> >
 
K

KitCaz

OK, this helps. My setting was "warning for signed macros, all unsigned

macros are disabled". I changed it to "No security check..." and it worked.

We have an institution-level macro that runs on Send, but I guess it's

"signed".

I'll keep plugging along! Thanks in advance for future answers :).

"Michael Bauer " wrote:



> Check your security settings, probably VBA isn't running at all:
> Tools/Macros/Security.

> > Best regards
> Michael Bauer

> > >

> Am Mon, 28 Sep 2009 07:49:01 -0700 schrieb KitCaz:
>
> > Thanks in advance for your patience. So if I applied the change you
> > mentioned, why don't I get a msgbox pop up on startup? This is what I

> have:
> > Private Sub Application_Startup()
> > Dim olns As Outlook.NameSpace
> > Set olns = Application.Session
> > MsgBox olns.GetDefaultFolder(olFolderTasks).Name
> > End Sub
> > "Michael Bauer " wrote:
> >
> >
> >
> >> Don't create a new instance of Outlook as it is already running, instead

> use
> >> the available Application object. Then, you have forgotten to set the

> olns
> >> variable to anything. This should work:
> >
> >> Private Sub Application_Startup()
> >
> >> Dim olns As Outlook.NameSpace
> >> set olns=Application.Session
> >> MsgBox olns.GetDefaultFolder(olFolderTasks).Name
> >
> >> End Sub
> >
> >> > >> Best regards
> >> Michael Bauer
> >
> >> > >> > >>

> >
> >
> >> Am Tue, 22 Sep 2009 08:43:02 -0700 schrieb KitCaz:
> >
> >>> Michael, thank you.
> >>
> >>> So I opened Outlook, pressed F11 to reveal the VB, expanded Microsoft
> >> Office
> >>> Outlook, selected ThisOutlookSession, then created this sub, just to see
> >> if I
> >>> was on the right track, saved, closed OL, and reopened, but didn't see

> any
> >>> msg box. What am I doing wrong?:
> >>
> >>> Private Sub Application_Startup()
> >>
> >>> Dim ol As New Outlook.Application
> >>> Dim olns As Outlook.NameSpace
> >>
> >>> MsgBox olns.GetDefaultFolder(olFolderTasks).Name
> >>
> >>> End Sub
> >>
> >>
> >>> "Michael Bauer " wrote:
> >>
> >>>
> >>>
> >>>> Your function must be called from the Application_Startup event, which

> is
> >>>> called by Outlook at startup.
> >>>
> >>>> See the GetDefaultFolder function to get a reference to your default

> task
> >>>> folder. The returned folder object has an Items collection, through

> which
> >>>> you can loop. Then for each TaskItem object set its ReminderTime
> >> =DueDate,
> >>>> and ReminderSet=True, then call Save.
> >>>
> >>>> > >>>> Best regards
> >>>> Michael Bauer
> >>>
> >>>> > >>>> > >>>>

> >>>
> >>>
> >>>> Am Mon, 21 Sep 2009 13:23:01 -0700 schrieb KitCaz:
> >>>
> >>>>> Hi there!
> >>>>
> >>>>> I'm having an issue with my phone and it's interface with my tasks,

> it's
> >>>>> deleting my reminders.
> >>>>
> >>>>> So until that's resolved I want to stop the bleeding. I'm reasonably
> >> good
> >>>>> at VBA in Access but not Outlook, so I need a little help. My goal:
> >>>>
> >>>>> On opening Outlook, I'd like a VBA procedure to scan all of my
> >>>> non-completed
> >>>>> Tasks, updating the Reminder Date from the Due Date (Due Date not

> being
> >>>>> compromised).
> >>>>
> >>>>> I've Googled myself silly but all the code snippets I find are a shade
> >> too
> >>>>> fragmented for me to plug them in. Anyone have a VBA bone they can
> >> throw
> >>>> me?
> >>>>
> >>>>> Chris
> >>>
> >>

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Body text of email disappears when I scan an attachment from printer to email Using Outlook 1
D Macro to scan email distribution list when replying Using Outlook 2
M Scan PST results Using Outlook 2
B Auto scan/send Outlook VBA and Custom Forms 5
R how to scan individual email messages Outlook 2010 64bit Using Outlook 1
J How do I scan and insert into Outlook 2007? Using Outlook 3
icacream New password won't update Using Outlook 2
Commodore Safe way to add or update holidays; Windows Notifications issue Using Outlook 8
O Batch update calendar Using Outlook 3
R Outlook 365 update sets delete from server flag Using Outlook 2
V Update new custom field Outlook VBA and Custom Forms 5
P Outlook 2019 UI changes after 20H2 update Using Outlook 1
D Change Microsoft Account password - what to do to update on all devices Using Outlook 4
K can't get custom form to update multiple contacts using VBA Outlook VBA and Custom Forms 3
B Outlook 2016 Retail C2R keeps logging since update? Using Outlook 0
C Not sync folders not found after MS Outlook 365 update Using Outlook 1
W September 2020 - No Default Email Client message after Office Update Using Outlook 1
D.Moore VBA script fail after Office 365 update Using Outlook 8
W April 2020 Office 365 Update - Add-Ons fail after Office 365 Update Using Outlook 6
M Outlook 2010 Problem with OutLook 2010 32 bit, after Windows Auto Update Using Outlook 3
Jennifer Murphy Grant R/W (update) access to a friend Using Outlook 3
L Favorites don't update Using Outlook 1
F Copy and replace not update contact in another pst Using Outlook 0
M Message list font changed after update Using Outlook 2
M Quicken One Step Update Bill Reminders Not Syncing to Outlook Using Outlook 1
O Windows 1803 update : QAT and toolbar changed, language pack gone... Using Outlook 5
J Updating existing entry on shared calendar wants to send update from delegate Using Outlook 0
N Using email notification to update calendar events? Outlook VBA and Custom Forms 4
K Update Appointment category when changed in Excel Using Outlook 3
V Outlook 2003 problem with Windows 10 Creators Update 1709 Using Outlook 0
G Windows Update Causes BCM Database Access Problem? BCM (Business Contact Manager) 4
K Update subject based on text in body Outlook VBA and Custom Forms 3
A Creating Progress Bar or Status Bar Update Outlook VBA and Custom Forms 0
M Recent Update Did not Fix Search Problems Using Outlook 7
R Custom Contact Form how to update when loaded. Outlook VBA and Custom Forms 6
C Update Notes for Meeting Attendees Using Outlook 8
A Attendee Update Outlook Meeting Invite Using Outlook 0
Diane Poremsky Outlook Email Security Update Using Outlook 0
S Task Update coming as email and not updating task Using Outlook 3
Diane Poremsky Remove Office 2013 Update Banner Using Outlook 0
B IMAP folders don't update when Outlook 365 opens Using Outlook 0
J Outlook Macro to Update Sharepoint Excel File Using Outlook 1
Diane Poremsky Task Request Status Update Address Missing Using Outlook 0
Christopher M Importing from Eudora Update Using Outlook 5
Cameron Piper Automatically update custom forms across multiple computers Outlook VBA and Custom Forms 1
M Update field codes when opening Outlook Template Outlook VBA and Custom Forms 2
Bachelle Macro to Update Existing Task from New Email Outlook VBA and Custom Forms 3
I Microsoft Security Update KB3097877 Using Outlook 14
S Outlook 2010: October 2015 Update Using Outlook 0
S Outlook 2013: October 2015 Update Using Outlook 0

Similar threads

Top