Why Can't I create an Appointment using this C# code?

I have the following C# code and I'm getting an error (see below). Can anyone tell me what I am missing and why would I get an error at this point in the code?
public static void Test()
GroupwareTypeLibrary.Application groupwiseApp;
GroupwareTypeLibrary.Account groupwiseAccount;
object gwAppointment = "GW.MESSAGE.APPOINTMENT";
object _missing = System.Reflection.Missing.Value;
object egwDraft = 4;
string mypassword = "abc123";
groupwiseApp = new GroupwareTypeLibrary.Application();
groupwiseAccount = groupwiseApp.Login("", "", mypassword, 0, _missing);
//Create a New Appointment
GroupwareTypeLibrary.Appointment7 appt;
try
appt = (GroupwareTypeLibrary.Appointment7)groupwiseAccoun t.WorkFolder.Messages.Add(gwAppointment, egwDraft, _missing);
>>>>>>>>>>>> I get the following error on the line above
>>>>>>>>>>>> "Object does not match target type." Any Ideas (i.e., what "type" should I use, See below the properties of the appointment I'm trying to set) ????
catch (System.Exception ex)
MessageBox.Show("Could not create Appointment item:\r\n\r\n" + ex.Message);
return;
appt.StartDate = DateTime.Now;
appt.EndDate = DateTime.Now.AddMinutes(30);
appt.AlarmSet = false;
appt.Subject.PlainText = "This is the Subject";
string messageID = appt.MessageID.ToString();
string RetString;
string cmdOpenMessage = "ItemOpen(\"" + messageID + "\")";
GroupWiseCommander.GWCommander gwc = new GroupWiseCommander.GWCommander();
gwc.Execute(cmdOpenMessage, out RetString);
return;

I solved the problem. The above code works fine if used alone, but I was also using the DevExpress.XtraScheduler control, and when I updated the GroupWise calendar items using a background thread, from that point on I couldn't talk to GroupWise at all. So I've rewritten my code not to use a background thread and it appears to be working fine.

Similar Messages

  • Why can't I send game request using this browser as the main browser on my phone?

    Every time I try to send a life on candy crush it doesn't send .

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    The Firefox cache temporarily stores images, scripts, and other parts of websites while you are browsing. <br>
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies, do the following:
    #Tap the menu icon located at the top right corner. This is the icon with 3 bars. On older Android devices you'll have to press the hardware menu key and then tap More.
    #Tap '''Settings'''.
    #After that, you will be taken to the settings screen. In the settings screen, look under the section '''''Privacy & Security''''' and select '''Clear private data'''.
    #You will then be taken to a list of what can be cleared. Select the following 2 for deletion:
    #*Cookies & active logins
    #*Cache
    #After those have been selected, tap the '''Clear data''' button to actually clear the cache and cookies.
    Did this help you with your problems? Please let us know!

  • Why can't I create a new folder

    Why can't I create a new folder

    Is this a folder in iPhoto for iOS or some other folder?
    OT

  • Why can't I create a response to an email from the Viewer window?

    Why can't I create a response to an email from the Viewer window?
    When I select an email to respond to in the viewer window and click on the respond arrow that appears just under the header, a new response email opens for a split second then disappears.
    I have to actually click on and open the email message in its own screen to be able to then click on the respond arrow and succeed in having Mail open a response email that I can edit - one that remains open.
    This seems to be a bug that we need to have squashed.
    Steve

    Do I have to connect the iPad to a computer to make this work? Is the fact that I used another email address to set up my Apple ID years ago causing the problem? A friend of mine just got a new iPod and he was able to set up a me.com account. I am feeling rather stupid. Hope someone here can help.

  • Why can't I create a document in my Facebook group on my iPad? It won't let me input any text into the text box field after I create a new document. Thanks.

    Why can't I create a document in my Facebook group on my iPad. It won't let me input any text into the text box field after I create a new document. Thanks.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • Why can I only create 4 forms when I have purchased the entire package at 100+ dollars?

    Why can I only create 4 forms when I have purchased the entire package at 100+ dollars?

    FormsCentral can be used from anywhere, but to purchase a subscription you need a credit card with the mailing address in one of the countries supported for purcahse:
    http://forums.adobe.com/docs/DOC-1375
    The partner can purchase if they have access to a card in one of those countries.  Alternatively they do not need to purchase a subscription to edit forms that you've created, they do in order to create multiple forms of their own, but by your sharing forms with them at the "Co-author" level they have access to the editing.  Here are the instructions to share a form:
    http://forums.adobe.com/docs/DOC-2462
    Thanks,
    Josh

  • Why can't I create property nodes for item in STRICT typedef cluster?

    I've tried this in LV7.0/WIN2k and LV 7.1/OSX - both versions work the same.
    I have a TYPEDEF consisting of a cluster of items A, B, and C.
    I have a front-panel instance of this typedef.
    Under certain conditions, I want to disable and gray Item C, because it's not applicable.
    So I need a property node connected to item C.
    If the typedef is STRICT, then I cannot create such a property node - the menu item to create anything is just not there.
    If I change to NON-STRICT, then I can create the property node.
    I can change it back to STRICT, and the property node works just fine.
    The question is, if the nodes WORK normally, why can I not CREATE one?
    If there's some sense behind this, someone please point it out to me...
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    I agree with you, It would be nice to be able to keep the non strict typedef auto-update and extend it to properities which effect the look of a control. I am not sure why you can change the properities on a strict typedef. A strict typedef should have private properities (can only be changed from within the definition and no public other vi scope for writing these values. I have in the past used a custom control for presentation purposes and contained the structure of the data to be displayed within the typedef cluster. This is not all that automatic since we need vi's to convert between the definition and control. Seperating data structure from presentation is much like XML where the file only contains data structure and a reference to a style for presentation. It would be a very nice option to allow nonstrict typedefs to have an additional auto-update properities which could be toggled on and off. I would be curious to here others opinions on how to keep data structure and presentation consistant across an application without being tied down to a strict typedef (allowing the optional change of teh presentation at runtime).
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Why can't I create view in Analytic Workspace?

    Why can't I create view in Analytic Workspace?

    Hi There,
    1) This is the OBIEE forum, by the sounds of your question, which doesnt have much detail, Im guessing you want the OLAP forum for AWM related issues.
    2) Trying to help, I guess your trying to create the AW cube views, what version of AWM are you using ? It was first provided as a plug in but Im pretty sure the latest version of AWM ships with the functionality.
    BTW I'd try posting in here : OLAP

  • Why can I not create a PDF from a web page on my Adobe Acrobat 8 Pro on my new Windows 8 computer? It worked fine on my windows XP system?

    Why can I not create a PDF from a web page on my Adobe Acrobat 8 Pro on my new Windows 8 computer? It worked fine on my windows XP system?

    Acrobat 8 is not compatible with Windows 8,  for the simple reason it was
    created much before it and Adobe could not participate the changes to the
    OS that Microsoft implemented many years later on. You need to buy the
    current version for compatibility.

  • Why can't I create a gallery in iPhoto in the normal way who in the past? If I sent the gallery to another the pictures are deleted!

    Why can't I create a gallery in iPhoto in the normal way who in the past? If I sent the gallery to another the pictures now will be deleted!

    Before anyone can help, they need information to work with. Basic stuff:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. What were you doing when the problem arose?
    - Did it ever work properly?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    Anything else you can think of that might allow someone else to understand your issue.

  • My daughter is 11 years ild, soon. Why can't I create i Apple id for her?

    My daughter is 11 years ild, soon. Why can't I create i Apple id for her?

    Because a law in the USA requires website operators to obtain parental permission before collecting any personal information from a child under 13, and many have simply chosen not to allow them to sign up.
    (100003)

  • Why can't I create a new note on my iPad?

    Why can't I create a new note on my iPad?

    tammy313 wrote:
    the options in the tool bar at the bottom are not highlighted and it does not respond to my touch.
    You are talking about the forward, back, mail and trash can icons in the Notes App - correct?
    I've gone through restarting it and followed the instructions from the person last week.
    Have you restarted the iPad - is that what you mean? Have you quit and then restarted the app? Quit the app, and restart the iPad. It's worth a try.
    Double tap the home button and your recent apps will appear at the bottom. Hold down on the Notes app icon until it begins to wiggle. Then tap the minus sign to quit the app. Then tap the screen. Now restart the iPad.
    Carolyn explained this above (restart) but here it is again....
    Hold down on the sleep button until the red slider appears and slide to shut off. Hold down on the sleep button until the Apple logos appears then let go of the button and the iPad will restart. See if that helps.

  • HT4759 why can not I find my iPhone using the service iCloud? I write that my phone is not in the network, although in reality it is on the network around the clock! I have an account there!

    why can not I find my iPhone using the service iCloud? I write that my phone is not in the network, although in reality it is on the network around the clock! I have an account there!

    Try turning Find My iPhone off, then back on.

  • Why can´t I create projects and tasks into a External Group?

    Why can´t I create projects and tasks into a External Group?

    At this time, it's not possible to collaborate on a Project with External Contributors or add an Externally-Facing group to a Project. This is functionality that we we hope to add at some point in the future.

  • Why can't my apple id be used to unlock my iphone

    why can't my Apple ID be used to unlock my iPhone

    If this is a second hand phone, the Activation lock of the previous owner might still be active. Without removing it, the phone can't be used anymore:
    iCloud: Remove your device from Find My iPhone

Maybe you are looking for

  • Can't access WMA files using flip4mac plug-in

    I'm a new mac user who just bought a macbook this past weekend. I realize that the below is perhaps a microsoft software issue, and not an apple issue (the apple care service people said as much and dismissed me), but the microsoft forums provide no

  • Putting Photoshop CS6 Student and Teacher Edition on a second computer

    So I just got a new computer because the old one got a lovely looking crack in it. I purchased Adobe Photoshop CS6 Extended Student and Teacher Edition a couple of months ago. I want to know how to put it on this computer. Also, info on how to do the

  • RTMT shutsdown when collecting files

    I am using RTMT 8.7 and when I am in Trace & Log Central and attempt to collect files RTMT just crashes.  Using Win7 64-bit, no application logs within windows to give me insight to this problem.  Anyone else seen this? 

  • Could Not Set Up Apple Pay

    Can't seem to setup apple pay. Have tried both in settings and passbook. I get the same error. "Could Not Set Up Apple Pay An error occurred while setting up Apple Pay" Anyone have any ideas why this is happening? I have re started the phone twice, n

  • I bought a bible on ipad, it can not open now, why?

    I bought a bible (Holy Bible) for the ipad.  I use is a lot.  One day I opened itune, I don't know what I did, but when I try to open the bible again on ibook. there is a dialog shows,  it said "failed to load book because the requested resource is m