Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / March 2008

Tip: Looking for answers? Try searching our database.

what reference do i need. why error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dickery1 - 06 Mar 2008 01:52 GMT
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
Sue Mosher [MVP-Outlook] - 06 Mar 2008 02:44 GMT
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.

Signature

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

> get the following error and am stuck,  compile error
> sub or function not defined. not sure what to do to fix it.
[quoted text clipped - 20 lines]
>
> End Sub
Dickery1 - 06 Mar 2008 11:01 GMT
On Mar 5, 9:44 pm, "Sue Mosher [MVP-Outlook]" <sue...@outlookcode.com>
wrote:
> This is Outlook VBA code? This statement
>
[quoted text clipped - 38 lines]
>
> - Show quoted text -

thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.