outofpractice
Registered User.
- Local time
- Today, 13:17
- Joined
- May 10, 2011
- Messages
- 32
OK - we have a person leaving our department in a couple weeks and one of the tasks she does is coming to me. Basically what this task is is: she has a list of about 30 people that she emails quarterly to remind them to review their content on the website. Each person's email has links to their specific pages to review. The way she does it is she has drafts for each person and copies/pastes each quarter from the draft and emails the person. I really do not want to do that - I would like to just set something up automated to remind these people to review their pages. My initial thought was to try and use Lotus Notes to do this, but I think my IT staff has that function shut off because I tried the: Create -> Agent but nothing happens (maybe there was another way to go about this?
Anyhow - so my next thought was to just load up into an Access database all of the contacts, their emails, and their pages - I would then be able to email them with a button press. I think that I am about there but am running into problems with the VB (I am not programmer, I've been able to cobble together what I have with some research and looking at others work).
So all that I have are two tables - one with Contact Name/Email Address and table with Page Name, Page Link, and Owner (Contact Name)
I set up a form (based on a query) that when opened, record 1 will show:
John Smith and in a sub-form all of the pages which he ownes. I then have a button on the page to generate the email. I have that part working - email is sent to the email pulled for the owner just fine - the problem is if the person owns multiple pages, I am only sending the first record. What I have been trying to figure out is how to have the VB create the email and return all of the pages that are associated with the person (hope that explination makes sense).
What I have is:
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim session As Object
Dim db As Object
Dim doc As Object
Dim intUserResponse As Integer
Dim recipient(3) As Variant
Dim recipCC(2) As Variant
recipient(0) = [Contact_Email].Value
recipCC(0) = "myemail@address"
Set session = CreateObject("Notes.NotesSession")
Set db = session.GETDATABASE("", "")
Call db.OPENMAIL
Set doc = db.CREATEDOCUMENT()
doc.Form = "Memo"
doc.Subject = "Quarterly Page Review "
doc.body = [qry_Page_Query subform]![Page_Title].Value
doc.SendTo = recipient
doc.CopyTo = recipCC
Call doc.SEND(False)
DoCmd.GoToRecord , , acNext
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
The line I have above in Red is where the Page information is being pulled from and I need to have it pull however many records are on the sub-form.
DB is very basic:
Tables:
tbl_Contact
tbl_Page
Query
qry_Page_Query
Forms
frm_Information
qry_Page_Query subform
I hope I have explained sufficiently and given enough information for some assistance. Thanks!
Anyhow - so my next thought was to just load up into an Access database all of the contacts, their emails, and their pages - I would then be able to email them with a button press. I think that I am about there but am running into problems with the VB (I am not programmer, I've been able to cobble together what I have with some research and looking at others work).
So all that I have are two tables - one with Contact Name/Email Address and table with Page Name, Page Link, and Owner (Contact Name)
I set up a form (based on a query) that when opened, record 1 will show:
John Smith and in a sub-form all of the pages which he ownes. I then have a button on the page to generate the email. I have that part working - email is sent to the email pulled for the owner just fine - the problem is if the person owns multiple pages, I am only sending the first record. What I have been trying to figure out is how to have the VB create the email and return all of the pages that are associated with the person (hope that explination makes sense).
What I have is:
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim session As Object
Dim db As Object
Dim doc As Object
Dim intUserResponse As Integer
Dim recipient(3) As Variant
Dim recipCC(2) As Variant
recipient(0) = [Contact_Email].Value
recipCC(0) = "myemail@address"
Set session = CreateObject("Notes.NotesSession")
Set db = session.GETDATABASE("", "")
Call db.OPENMAIL
Set doc = db.CREATEDOCUMENT()
doc.Form = "Memo"
doc.Subject = "Quarterly Page Review "
doc.body = [qry_Page_Query subform]![Page_Title].Value
doc.SendTo = recipient
doc.CopyTo = recipCC
Call doc.SEND(False)
DoCmd.GoToRecord , , acNext
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
The line I have above in Red is where the Page information is being pulled from and I need to have it pull however many records are on the sub-form.
DB is very basic:
Tables:
tbl_Contact
tbl_Page
Query
qry_Page_Query
Forms
frm_Information
qry_Page_Query subform
I hope I have explained sufficiently and given enough information for some assistance. Thanks!