Using Access to create an appointment and add attendees

Hi i am using Access to create an appointment in outlook.  I have the code 
for creating the appointment but i am struggling to add attendees. This is 
what i have so far;
DoCmd.RunCommand acCmdSaveRecord
        Dim objOutlook As Outlook.Application
        Dim objAppt As Outlook.AppointmentItem
        Dim objRecurPattern As Outlook.RecurrencePattern
        Set objOutlook = CreateObject("Outlook.Application")
        Set objAppt = objOutlook.CreateItem(olAppointmentItem)
        With objAppt
            .Start = Est_Finish_Date
            .Subject = Component
            .End = Est_Finish_Date
            .Body = Comments
            If Comments = Null Then .Body = Null
            .Categories = "Job"
            .AllDayEvent = True
            .Save
            End With
            Set objAppt = Nothing
    Set objOutlook = Nothing
    DoCmd.RunCommand acCmdSaveRecord
    MsgBox "Appointment Added!"
    Exit Sub

can anyone help?
0
Utf
5/19/2010 11:41:01 AM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
1262 Views

Similar Articles

[PageSpeed] 30

On Wed, 19 May 2010 04:41:01 -0700, VainDM
<VainDM@discussions.microsoft.com> wrote:

You're doing pretty good so far. Just above the "End With" line write:
..Recipients.Add("Person One")
..Recipients.Add("Person Two")
etc.


-Tom.
Microsoft Access MVP

>Hi i am using Access to create an appointment in outlook.  I have the code 
>for creating the appointment but i am struggling to add attendees. This is 
>what i have so far;
>DoCmd.RunCommand acCmdSaveRecord
>        Dim objOutlook As Outlook.Application
>        Dim objAppt As Outlook.AppointmentItem
>        Dim objRecurPattern As Outlook.RecurrencePattern
>        Set objOutlook = CreateObject("Outlook.Application")
>        Set objAppt = objOutlook.CreateItem(olAppointmentItem)
>        With objAppt
>            .Start = Est_Finish_Date
>            .Subject = Component
>            .End = Est_Finish_Date
>            .Body = Comments
>            If Comments = Null Then .Body = Null
>            .Categories = "Job"
>            .AllDayEvent = True
>            .Save
>            End With
>            Set objAppt = Nothing
>    Set objOutlook = Nothing
>    DoCmd.RunCommand acCmdSaveRecord
>    MsgBox "Appointment Added!"
>    Exit Sub
>
>can anyone help?
0
Tom
5/19/2010 2:00:02 PM
Hi Tom

Thanks for your reply, i was looking for attendee's. Didn't think of looking 
for recipients.
Now the process goes through without an error, however neither of the 
recipients have received the appointment.

Any Ideas

Thanks


"Tom van Stiphout" wrote:

> On Wed, 19 May 2010 04:41:01 -0700, VainDM
> <VainDM@discussions.microsoft.com> wrote:
> 
> You're doing pretty good so far. Just above the "End With" line write:
> ..Recipients.Add("Person One")
> ..Recipients.Add("Person Two")
> etc.
> 
> 
> -Tom.
> Microsoft Access MVP
> 
> >Hi i am using Access to create an appointment in outlook.  I have the code 
> >for creating the appointment but i am struggling to add attendees. This is 
> >what i have so far;
> >DoCmd.RunCommand acCmdSaveRecord
> >        Dim objOutlook As Outlook.Application
> >        Dim objAppt As Outlook.AppointmentItem
> >        Dim objRecurPattern As Outlook.RecurrencePattern
> >        Set objOutlook = CreateObject("Outlook.Application")
> >        Set objAppt = objOutlook.CreateItem(olAppointmentItem)
> >        With objAppt
> >            .Start = Est_Finish_Date
> >            .Subject = Component
> >            .End = Est_Finish_Date
> >            .Body = Comments
> >            If Comments = Null Then .Body = Null
> >            .Categories = "Job"
> >            .AllDayEvent = True
> >            .Save
> >            End With
> >            Set objAppt = Nothing
> >    Set objOutlook = Nothing
> >    DoCmd.RunCommand acCmdSaveRecord
> >    MsgBox "Appointment Added!"
> >    Exit Sub
> >
> >can anyone help?
> .
> 
0
Utf
5/20/2010 9:27:01 AM
Also i am using Office 2007

"VainDM" wrote:

> Hi i am using Access to create an appointment in outlook.  I have the code 
> for creating the appointment but i am struggling to add attendees. This is 
> what i have so far;
> DoCmd.RunCommand acCmdSaveRecord
>         Dim objOutlook As Outlook.Application
>         Dim objAppt As Outlook.AppointmentItem
>         Dim objRecurPattern As Outlook.RecurrencePattern
>         Set objOutlook = CreateObject("Outlook.Application")
>         Set objAppt = objOutlook.CreateItem(olAppointmentItem)
>         With objAppt
>             .Start = Est_Finish_Date
>             .Subject = Component
>             .End = Est_Finish_Date
>             .Body = Comments
>             If Comments = Null Then .Body = Null
>             .Categories = "Job"
>             .AllDayEvent = True
>             .Save
>             End With
>             Set objAppt = Nothing
>     Set objOutlook = Nothing
>     DoCmd.RunCommand acCmdSaveRecord
>     MsgBox "Appointment Added!"
>     Exit Sub
> 
> can anyone help?
0
Utf
5/20/2010 12:44:01 PM
Reply:

Similar Artilces:

Creating a new field based on conditions
I have a database that tracks insurance information for our various vendors. Each insurance type has 2 fields - a requirement field (yes/no), and an effective field (some show an expiration date, some are yes/no). I have created a query that will return only the records for which insurance is required but is expired/missing. My problem is that I want to create a new field that is calculated based on the values in the other two fields in order to make the resulting report more user-friendly. For example, if GLRequired is True and GLExpiration is <Now(), I want the new field to say...

Creating array of specific object types dynamically
Hi, little gotcha. Some COM objects requires array of specific type. To give you example, following DOESN'T work: [array]$X = @() However below code works: [int32[]]$X = @() For my framework, array type can be dynamic and I don't know in advance what type it's going to be. So what I would need is below: [$PropertyType[]]$X = @() This doesn't work with error message "Unable to find type". As a workaround, I solved it using following: Invoke-Expression "[$$PropertyType[]]`$Var = @()" This code works as expected, I am just curious if ...

Using F4 for charts and sorting
Excel 2007 - I would love for some of the F4 features to return to charting and sorting. For example, if I change the y-axis measurement scale on a column chart I want to be able to hit F4 on the next chart to make the same change. If I custom sort a list, I want to hit F4 on the next list and have it sort the same way. Have these updates been made? Nope. I hope they make it into the next release (Office 14), but we won't see them in 2007. One of the main reasons I don't use 2007 for anything important is un-features like the lack of F4 capability make me much less efficient...

Use Form to prompt for report criteria
I have a form that I am using to prompt for report criteria. When I run the query outside of the form, it works fine - prompting me for both criteria. However when I run from the form, I get #Error#. Can you see what I am doing wrong? Thanks in advance. I have two combo boxes that I have put in my underlying query. In the fields of the query are: [Forms]![frmSelection Criteria Form]![OfficeNumber] [Forms]![frmSelection Criteria Form]![Manager] *** On the OnClick event is the following: Private Sub Command6_Click() On Error GoTo Err_command6_Click Dim stDocName As String st...

Browse for Drive/Dir/File using MFC
Is it possible, in an MFC app, to use one of the standard dialog-based classes/functions to browse for either a drive OR a directory OR a file? Any help appreciated, Steve. Take a look at the SHBrowseForFolder() API. -- Cheers Check Abdoul [ VC++ MVP ] ----------------------------------- "Steve Carroll" <ctrl@optusnet.com.au> wrote in message news:#tR$bmdfDHA.696@TK2MSFTNGP09.phx.gbl... > Is it possible, in an MFC app, to use one of the standard dialog-based > classes/functions to browse for either a drive OR a directory OR a file? > > Any help appreciated...

Adding an item to a popup menu in outlook's inbox using VBA
Hello all, On rightclicking on the mailitems in the outlook's inbox we can see a popup menu.i want to add a menu item to that popup menu using outlook VBA. Please do help me in this regard. Thanking you regards, Revathy.v ...

converting tabular structures in a Word document into an actual table or reading data from the tabular structures using VBA code
I have a macro which can read the last cell/column of all tables in a Word 2003/2007 document and store the data in an MS-Access table. But, some Word documents have the data in structures like a table format but are not actually tables. The structure looks like a table, but the table borders are actually line connectors. These documents were created by a software(VeryPDF PDF to Word converter) which converted the PDF documents(the original format these documents were) into Word documents. 1. Is there a way I can convert/replace the tabular structures with actual tables in Word so t...

automaticly create graph
what i would like to do is create a spread sheet where by i entered the fixed and variable costs as well as the selling price. i would then like a graph to automaicly change and display the this info. Does anyone know how to do this. Decide which cells on the spreadsheet you wish to include in the chart. Select those cells. Follow the menu option: Insert/ Chart, and answer the questions in the wizard. Have you looked in Excel help at the topics concerned with charts, starting with "Create a chart"? Have you looked at the training material under http://office.microsoft.com/...

is there anyway to access funcion written in c by vc++
hi Is this is possible to access ,a function written in C by VC++. Arbind >Is this is possible to access ,a function written in C by VC++. Yes. I suspect you need to know about using extern "C" to tell the compiler that your function is 'C' rather than C++. For example: extern "C" int MyFn( int p1 ); You often use it like this: extern "C" { #include "Your_C_Header.g" } Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq >#include "Your_C_Header.g" or even #include "Your_C_Header.h" who put that g key in the wa...

Sorting Attendee Lists in Outlook 2003
Is there any way to sort attendees by either name or attendee status in Outlook 2003? I don't know how Microsoft could be so oblivious to the need for this feature. You can't even click on the column headers to sort, let alone print out a list of people sorted by accept and decline. Microsoft's online help system recommends Alt + PrntScreen???? How archaic is that? Is there anyone out there that can help me??? Thanks! ...

Insert,Update Data in sage (MS Access Linked tables) using Vb.net form
Hi folks, I am developing application using vb.net which requires integration with SAGE LINE 50 (Accounting software ) V11... The data which SAGE is using is MC ACCESS 2003 database... with linked tables in it... Now I Have developed the Sage connection using ODBC which works fine when reading the record but cannot Add or Update record into the Linked tables.... When i debug the program the error is at the line where it has... <br> MyodbcCommand.ExecutenonQuery() <br> Can anybody Help ????? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/acce...

How to make a Add key disabled after adding one record unless
Hi, I have a form where I am adding records. There are two boxes where one has to put the lineitemnumber and another box where one has to put the description. Unless the above two boxes are filled in the Add command box need to be disabled. Now, the problem is after adding one record the Add button is enabled and I cannot disable it. I would appreciate any help to solve this. The error message is: The methos is not supported The following is the code: Private Sub cmdadd_Click() On Error GoTo Err_cmdadd_Click If (IsNull(Me.LineItemID) = True) Or (IsNull(Me.Description) = True) Then ...

Accessing MIcrosoft Outlook
Yesterday, when I tried to access Outlook in my home pC, I received the following message: Cannot open MIcrosoft Office Outlook. Cannot open the Outlook window. The set of folders cannot be opened. The file C:|Users \jillandgordon\AppData\Local\Microsoft\Outlook\Outlook.pst is not a personal folders file. Does anyone have any ideas as to how I can fix this? Masny thanks, Gordon in TX Try this first http://support.microsoft.com/kb/287497/ "Gordon McDougall" <braidwoodboy@gmail.com> wrote in message news:d0e17ac8-0215-431c-971f-bd862b58a245@y17g2000yqd....

Creating a Graph
hi all, i want to create a grapg dynamically getting the values from a file.. take for example the first row is the x axis and the second row is the y axis. i am planning to do this in mfc. what needs to be done for this.. if somebody has an example relating this please send me the link or the code.. thanks Read the data. Plot it. First, you have to read the data. You read the data and build an array of <x,y> pairs in whatever way you want to save them, e.g., int, float, double. This is pretty elementary programming. To do a graph in a very fancy way, you should use an existing gra...

Create static text from cell reference
Hey everyone... I have two columns of text which I'm combining in a third column using the formula (for C1, for example) =A1 & char(10) & B1 This gives me the contents of A1 on a line above the contents of B1 and works fine. What I NEED to do is somehow create column C as TEXT, not as a REFERENCED data from columns A and B. How do I create a cell that contains the actual TEXT content of another cell instead of a REFERENCE to the other cell? TIA... Select all the cells in "C" that have content. R-click them and select "Copy" then r-click again, sele...

I do not have access to the D: drive from Publisher, why?
I do not have access to the D: drive from Publisher, why? It keeps saying "incorrect function" khaganman <khaganman@discussions.microsoft.com> was very recently heard to utter: > I do not have access to the D: drive from Publisher, why? It keeps > saying "incorrect function" Is the D: drive your CD drive? -- Ed Bennett - MVP Microsoft Publisher ...

Accessing my information offline
I have updated my Outlook to 2002 on my notebook computer and when it is connected on the Lan at my office(new ethernet connection) I can see my calendar, addressbook, e- mails etc. However, when I disconnect and bring my notebook home, and try to access calendar, etc, it says I must sychronize while I am still connected to the Lan. My previous version of outlook didn't have this problem. I synched it on the Lan and it worked. This one won't. Any ideas???? How do you have your folders marked for Offline use under tools->Send/Receive settings? --� Milly Staples [MVP - Outlo...

Add new record through Form view
I have a table which is linked to a form, i would like to have a command button which will add a new record to my table. On the click of command button it should view the last empty row of my table in a form. On Sat, 26 Dec 2009 11:11:01 -0800, Ranjith Kurian <RanjithKurian@discussions.microsoft.com> wrote: >I have a table which is linked to a form, i would like to have a command >button which will add a new record to my table. >On the click of command button it should view the last empty row of my table >in a form. The Click event should show [Event Proced...

Trying to create an Update query based on HR data to find upline V
Hi All, looking for some advice. I have an HR table that contains employee information but does not contain management chain info. Basically i am trying to determine who the employees upline VP is. The fields i have to work with are [Employee Name], [Manager Name] and [Job Title]. I figure the logic would be to check the employees' manager and if the manager is a VP (based on job title), return the manager's name to a field called [VP]. If the manager is not a VP then check that manager's manager, so on and so forth until a VP is found. Any ideas would be much appr...

Using atl based win dll with CString functions from the mfc projec #3
I have atl based general windows dll with class which contains functions which uses CString as parameters or return values. This dll might be used from the atl or mfc project. Dll can be used from ATL project without problems but whenever I try to use this class from the MFC project I get the following linker errors: error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall MyClass::AddMenu(long,class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &,long)" ... If I replace CStri...

Can you create custom activities? MSCRM 3.0
Hi, Is there a way to create a new custom activity instead of customising an existing one? I have created a custom entity called 'Chat' utilising an IFRAME. All works well but this entity really should be an activity considering it's properties. In fact I've just been introduced to MS-CRM 3.0 and don't really understand what the difference is between an entity and activity. Would anyone shed the light for me? BTW, I think 3.0 looks great. Gotta admit it's improved. Cheers. Ty In my experience, you cannot create custom activities. In fact, I have been dire...

Not using zeros in graphing.
I have a running workbook that has tons of information. I have added a sum page in order to have all the data summed up in one simple place. I have formulas that read back into the workbook to link to a cell. Depending on what moth it is, that cell could be empty as it is a yearly wookbook. For example, if this is August, then there is information in the workbook up to August, but none after. With that said, the sum page has the #DIV/0! in the cell which essentially equals zero. I also have graphs that I have linked to this sum page. My problem is in order to keep the graphs up to...

Program Trying to Access Email Addresses #3
Outlook 2002. When I try to create new mail, forward, or reply I get a dialog box telling me: A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No". How do I determine what program is trying to access the Outlook addresses? I have up to date Norton Anti-virus definitions and have done a system scan, with nothing detected. Thanks for the help. ...

using vba so search multiple Sheets
i'm trying to search across multiple sheets based on data submitted via an input box. So essentially, you click the button, a box appears, you type what your looking for and if it finds it, it'll select it otherwise a error message appeats. i found the below code, but it only works if the cell with the value in it is active (i.e. i've clicked on it). Code: Dim datatoFind Dim sheetCount As Integer Dim counter As Integer Dim currentSheet As Integer On Error Resume Next currentSheet = ActiveSheet.Index datatoFind = InputBox("Please enter the value to search...

DPM and VMM on same server using side-by-side SQL installation
Windows 2008 Std R2 Server, 64bit VMM 2007 is currently installed (with the built-in default database) SQL 2005 Express Edition, SP3, 32bit. I was advised by Microsoft that both VMM and DPM could be installed on the same server (small DR environment) The VMs are hosted on a Windows 2008 Enterprise Server w/ VS2005R2 - because the hardware didn't support HyperV. VMM works great to manage the Windows 2008 VS2005R2 Host running Win2K3 server instances ... after lots of trial and error. Now, I need to install DPM 2007 onto the same server... DPM wants to install the 64bit vers...