is it possible to add multiple records in one Outlook Reminder? I need to set an Outlook task reminder containing list of workers who need to extend their working contracts three months before it reach its limit date.
This reminder will collectively pick the workers who need to extend their contracts and be appear in the 1st day of certain month (approximately three months before their contracts end).
I was about to set one reminder for each worker, but it turned out confusing as we have so many workers in the record.
What should I do with this? I'm thinking about using Record-set, but I have no idea how to put it on my code.
Thanks!
6 1922 zmbd 5,501
Expert Mod 4TB
Sorry,
Records in Outlook? Although it is basically a front-end to a database, one doesn't usually mess with the underlying database without risking corruption of either the exchange-server or the PST.
Normally one would create an meeting, or a task and add the users to that object or one can create one item in the calendar and forward that item to multiple recipients.
I personally have set up groups in my contacts and then create a task or a meeting and add the group to the item or forward the calendar item to the group.
Can you be a lot more detailed about what you are attempting to do and how you are attempting to do this?
@zmbd hello, thanks for your reply.
I'm working on an access database, creating an application with reminder function. I use outlook as the reminder tools, so I put some code on Access to set outlook task reminder and it will pop up when the schedule meets its due date.
Basically, I have a table containing these fields : Employee_Number, Employee_Name, and Task_Due.
At first, I set one reminder for each record. But it turns out confusing since there are so many records in the table. My supervisor suggested me to group the reminder per month, so the outlook reminder only appear in the first day of each month. My idea is to make a single outlook reminder containing list of employees who have task due in the same month, so there will be no excessive load of reminders on the first day of the month.
Can I do it?
*I'm sorry for my broken English*
That sounds reasonable. If you would post a copy of your code, we might be able to tell you what changes might make it work for you.
here's some sneak-peek of the code I wrote before : - Private Sub Expired_AfterUpdate()
-
Dim outLookApp As Outlook.Application
-
Dim outLookTask As Outlook.TaskItem
-
-
Set outLookApp = CreateObject("outlook.application")
-
Set outLookTask = outLookApp.CreateItem(olTaskItem)
-
countMonth = MonthName(Month(Task_Due))
-
countYear = Year(Task_Due)
-
-
With outLookTask
-
.Subject = "Task Alert!!"
-
.Body = "Task alert for : " & Me.Employee_Name & ". Please submit your task prior to this following due date : " & countMonth & " " & countYear & ". Thank You!"
-
.ReminderSet = True
-
.Duedate = Me.Task_Due
-
.Assign
-
.ReminderTime = DateSerial(Year(Task_Due), (Month(Task_Due)) - 6, 1)
-
.Save
-
-
End With
-
MsgBox "Task has been set in Outlook succesfully", vbInformation, "Set Task Confirmed"
-
End Sub
it works well and the reminder appeared.. is there anything I have to improve?
can I have more information about using recordset in this kind of case? I never use recordset before..
thank you...
zmbd 5,501
Expert Mod 4TB
Ok,
You would open the recordset and then move thru using a loop adding the field value... Now using the information from the link on creating an appointment:
So using the information from the link on creating an appointment: - Set myRequiredAttendee = myItem.Recipients.Add("Nate Sun")
-
myRequiredAttendee.Type = olRequired
-
so the standard method I use is to build the query in the code; however, if you have a stored query that is just fine.
so something like this (warning air code - I've not ran this against outlook and the end user will need to add the outlook object and other code)
Now this would add (should) multiple attendees to a single task item because you create the task item first and then add the attendees. - Sub exampleloop()
-
Dim zdb As DAO.Database
-
Dim zrs As DAO.Recordset
-
Dim zSQL As String
-
Dim zAttende As String
-
'
-
'you'll need other variables
-
'for your Task object ofcourse
-
'
-
On Error GoTo zerrortrap
-
'
-
zSQL = "SELECT tbl1.pk, tbl1.somefield FROM tbl1"
-
'this is just placeholder you could use the name of a query you made and saved from the query editor
-
'such as zSQL= "qry_appointmentsto"
-
'
-
Set zdb = CurrentDb
-
Set zrs = zdb.OpenRecordset(Name:=zSQL, Type:=dbOpenForwardOnly)
-
'Note here, I've only opend for foward only, we're starting at the first record and not editing so this works just fine.
-
'you could open dbOpenDynamic if you needed to update a record
-
'
-
'build your outlooktask object first!
-
'Once bult then we can use the recordset we just opened
-
If zrs.RecordCount Then
-
'If there are any records then the result will be greater than 0 which evaluates to true
-
Do
-
zAttende = zrs![FieldWithTheReceipentsEmailorName]
-
'you may need to do something like
-
' "'" & zrs![fldname] & "'"
-
'
-
'cut and paste from the above example
-
Set myRequiredAttendee = myItem.Recipients.Add(zAttende)
-
myRequiredAttendee.Type = olRequired
-
zrs.MoveNext
-
'
-
Loop Until zrs.EOF
-
'
-
'other code
-
'cleanup - if you set it, clear it, if you open it, close it
-
If Not myRequiredAttendee Is Nothing Then Set myRequiredAttendee = Nothing
-
If Not myItem Is Nothing Then Set myItem = Nothing
-
If Not zrs Is Nothing Then
-
zrs.Close
-
Set zrs = Nothing
-
End If
-
If Not zdb Is Nothing Then Set zdb = Nothing
-
'
-
Exit Sub
-
zerrortrap:
-
'I use much more detailed error traps; however this would be the most basic.
-
'In production, I would have at least a table to store date/time, module, event, etc...
-
Debug.Print ">>" & Err.Number & " - " & Err.Description
-
Resume Next
-
End Sub
so... incorporate your code into the above... let us know what happens. :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: BCS |
last post by:
I have a web site in which the site administrator can input
information to a database through a web form. The information then
gets displayed on ASP pages. One field is a large text field. Of...
|
by: Noozer |
last post by:
We've created a new database and need to import the data from our old
database. Both are MS Access databases and each have multiple tables. The
table structure of each table is completely different...
|
by: Wadim Grasza |
last post by:
I want to store and display (on a form or a report) multiple pictures
per
record in an access database. The pictures are not stored within the
database. They are stored as files and the database...
|
by: Michael Meckelein |
last post by:
Hi,
My csharp application access a MS Access database through odbc connection.
Is there a way to compact the Access database after deleting records using
the odbc connection?
|
by: Rob Hill |
last post by:
I am using Microsoft Access as a prototype for a database application that
will eventually be rewritten in VB.NET. I would like to use Access for
prototyping future versions of the application.
...
|
by: davepisarek |
last post by:
I am looking for a quick and dirty way to create a hyperlink that will
open a Microsoft access database written in asp.
|
by: rajaaryan44 |
last post by:
how can we transfer data from one access database to another databse . the table name is same for both the database . in one table some records are there (rs say e.g.) now another table has say...
|
by: Brit |
last post by:
I have an ASP file that retrieves names from an Access database for 4 different categories of membership, which the visitor to the page selects (corporate, institutional, regular, or student). The...
|
by: Medaron |
last post by:
I am trying to wite a vba code to read all my outlook task fields in Access database. So far I have following code:
Sub OutlookTasks()
Dim ol As Object
Dim olns As Object
Dim objFolder As...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |