what reference do i need. why error

D

Dickery1

get the following error and am stuck, compile error
sub or function not defined. not sure what to do to fix it.

Sub MovePastDate2Today()
Dim t As TaskItem
Set f =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
strText
For Each t In f.Items
If (t.DueDate < DateAdd("d", 2, Now)) Then
strText = strText & (t.t.DueDate)


End


MsgBox strText


Next


On Error GoTo MovePastDate2Today_Error


MovePastDate2Today_Error:
MsgBox "Error " & Err.Number & "(" & Err.Description & ")"


End Sub
 
S

Sue Mosher [MVP-Outlook]

This is Outlook VBA code? This statement

strText

should be changed to strText = "" or removed completely. In this statement:

strText = strText & (t.t.DueDate)

t.t.DueDate should be t.DueDate and you probably will also want to put some kind of delimiter between the two text expressions.
 
D

Dickery1

This is Outlook VBA code? This statement

    strText

should be changed to strText = "" or removed completely. In this statement:

    strText = strText & (t.t.DueDate)

t.t.DueDate should be t.DueDate and you probably will also want to put some kind of delimiter between the two text expressions.

--
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54










- Show quoted text -

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top