Advertisement

07.12.2006 at 06:26AM PDT, ID: 21916534
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Code to have Outlook VBA read an Excel file (cell with a date), then have Outlook send a reminder on that same date.

Zone: VB Controls
Tags: outlook
I'm needing a reminder from Outlook, only I need Outlook to view an Excel file to read a specific cell, which will be a date, then take that same date and have Outlook send out a reminder.  Is this possible, or if some one can give me direction on what I need to do to accomplish this task, it would greatly be appreciated.  thank you, Alex.
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: Alexhomar
Solution Provided By: jomacinc
Participating Experts: 1
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
07.12.2006 at 09:23PM PDT, ID: 17096704

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 06:06AM PDT, ID: 17099169

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 06:23AM PDT, ID: 17099309

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 11:21AM PDT, ID: 17102207

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 04:08PM PDT, ID: 17104550

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 04:55PM PDT, ID: 17104775

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 04:59PM PDT, ID: 17104787

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 09:49PM PDT, ID: 17105843

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.13.2006 at 09:58PM PDT, ID: 17105881

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.17.2006 at 04:05AM PDT, ID: 17120962

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.17.2006 at 09:42PM PDT, ID: 17127760

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.17.2006 at 09:59PM PDT, ID: 17127798

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
07.12.2006 at 09:23PM PDT, ID: 17096704
This should not be too hard, but first some questions:

1) When does Outlook need to read the excel file and create the reminder?
2) What sort of reminder do you want to create (IE: a Task)?
3) Does the reminder need to be sent to another person or the current user?
4) Is the date in the excel file the date the reminder needs to be shown?

Regards, Jomac.
 
07.13.2006 at 06:06AM PDT, ID: 17099169
1) When does Outlook need to read the excel file and create the reminder?
      The reminder should start at 8:00 am on the date read from the Excel date.
2) What sort of reminder do you want to create (IE: a Task)?
      The reminder should occur on the date taken from Excel and occur every 30 minutes.
3) Does the reminder need to be sent to another person or the current user?
      The reminder should be sent to the current user only.
4) Is the date in the excel file the date the reminder needs to be shown?
       Yes.  Outlook would read the date in the Excel Cell, and that is when the reminder.

Can this be done?

 
07.13.2006 at 06:23AM PDT, ID: 17099309
Yes this can be done (I am about to go to bed now so I will write & post the solution in the morning).

Could you please clarify the answer to the following...

" 1) When does Outlook need to read the excel file and create the reminder?"
By this I mean how do you want to tell outlook it needs to read the file and create the reminder, for example do you want to manually run a macro that does it or should outlook do it automatically when it starts and only create the reminder if it is not already there etc?

"2) What sort of reminder do you want to create (IE: a Task)?"
Outlook does not have reminders by them self, they are attached to other items like tasks, appointments etc. I presume a task entry would be fine?
What do you mean by "occur every 30 minutes"

Regards, Jomac.
 
07.13.2006 at 11:21AM PDT, ID: 17102207
That sounds super:)  Thanks.

" 1) When does Outlook need to read the excel file and create the reminder?"
       outlook should do it automatically when it starts and only create the reminder if it is not already there.


"2) What sort of reminder do you want to create (IE: a Task)?"
      Outlook does not have reminders by them self, they are attached to other items like tasks, appointments etc. I presume a task entry    would be fine?  
      Yes, a task entry would be fine.  Never mind about the 30 minutes, my mind was on another task I was working on.

Thanks for taking the time.

alex

 
07.13.2006 at 04:08PM PDT, ID: 17104550
Ok, will post something after I have a coffee :-)
 
07.13.2006 at 04:55PM PDT, ID: 17104775
Ok here is the code, all below needs to be copied in to "ThisOutlookSession" code pane under [Tools > Macro > Visual Basic Editor] in Outlook.
Note that you will need to reference the "Microsoft Excel Object Library" for it to work. Also as this code currently stands, you need to delete the old task for it to create a new one, this could be modified so it will create the new one if the date is different. The code will run everytime Outlook starts (make sure Macros are enabled).

'------- Start Copying Below Here --------

' this is the subject to be put in the task
Private Const mTaskSubject As String = "Task From Excel"

Private Sub Application_Startup()
    ' check task does not already exists and create if not
    If Not ExcelReminderExists Then
        Call CreateExcelReminder("C:\SourceFile.xls")
    End If
End Sub

Private Sub CreateExcelReminder(sFilePath As String)
    ' you will need to add a reference to "Microsoft Excel" object library in the tools>reference menu.
    Dim oXlsApp As Excel.Application
    Dim oWkBk As Excel.Workbook
    Dim oWkSt As Excel.Worksheet
    Dim dtDate As Date
    Dim oTask As Outlook.TaskItem

    On Local Error GoTo ErrorTrap

    ' create hidden copy of excel
    Set oXlsApp = CreateObject("Excel.Application")
    If oXlsApp Is Nothing Then GoTo CleanUp
    oXlsApp.Visible = False
   
    ' load specified file
    Set oWkBk = oXlsApp.Workbooks.Open(sFilePath, False, True, , , , , , , , , , False)
    If oWkBk Is Nothing Then GoTo CleanUp

    ' get required worksheet
    Set oWkSt = oWkBk.Worksheets(1)
   
    ' read the date from the excel file (this presumes it is in cell 1A)
    dtDate = oWkSt.Cells(1, 1)
   
    ' make sure date includes time of 8:00 am
    dtDate = CDate(Format(dtDate, "dd mmm yyyy") & " 8:00am")
   
    ' create a new task and set properties for reminder etc.
    Set oTask = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks).Items.Add
    With oTask
        .Subject = mTaskSubject
        .ReminderSet = True
        .ReminderOverrideDefault
        .ReminderTime = dtDate
        Call .Save
    End With

CleanUp:
    Set oTask = Nothing
    Set oWkSt = Nothing
   
    ' close woorkbook if still open
    If Not oWkBk Is Nothing Then
        Call oWkBk.Close(False)
        Set oWkBk = Nothing
    End If
   
    ' close excel (if still open)
    If Not oXlsApp Is Nothing Then
        Call oXlsApp.Quit
        Set oXlsApp = Nothing
    End If
    Exit Sub

ErrorTrap:
    MsgBox "Error: #" & Err.Number & vbCrLf & Err.Description
    Resume CleanUp
End Sub

Private Function ExcelReminderExists() As Boolean
    ' search for a task with our subject and return True if found
    With Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
        ExcelReminderExists = Not (.Items.Find("[Subject] = " & mTaskSubject) Is Nothing)
    End With
End Function

'------- Stop Copying Above Here --------

Many Regards, Jomac.
Accepted Solution
 
07.13.2006 at 04:59PM PDT, ID: 17104787
Sorry I made a typo before I pasted the code, delete a line:

    With oTask
        .Subject = mTaskSubject
        .ReminderSet = True
        .ReminderOverrideDefault ' << delete this line it is incomplete and will cause an error
        .ReminderTime = dtDate
        Call .Save
    End With
 
07.13.2006 at 09:49PM PDT, ID: 17105843
Okay Jomacinc,
I'll try and put this together tomorrow and let you know how it goes.  Again, thanks for taking the time to help me out with this task.  I will reply to you in the evening tomorrow since I have a very big HONEY DO LIST to accomplish.  Thanks again, and I won't forget to let you know how it goes for me.  Alex
 
07.13.2006 at 09:58PM PDT, ID: 17105881
No probs, it all worked for me fine so if you have any trouble don't hesitate to ask..

Regards, Jomac.
 
07.17.2006 at 04:05AM PDT, ID: 17120962
So - how did it all go for you Alexhomar??
 
07.17.2006 at 09:42PM PDT, ID: 17127760
That's what I was looking for, it worked wonderfully.  I had a little problem with VBA to placed in the TASK, but I finally put two and two together and got it.  I apolgoize for the long delay, I got caught with my work and stuck in meetings during the day.  Thanks again for your time and dedication to answering my questions.

Alex
 
07.17.2006 at 09:59PM PDT, ID: 17127798
Good to hear you worked it out - many thanks for the grade!
Regards, Jomac.
 
 
20080236-EE-VQP-29