none
how to copy Calender meeting request from my custom form to user calender (outlook 2010 + Exchange 2010)

    Question

  • Good day

    I had make a Meeting Request Custom form and need to publish it to my network users,

    I found this script that can do this

    Set objOL = CreateObject("Outlook.Application")
    Set objItem = objOL.createItemFromTemplate("C:\Temp\COutlook\CAppointment.oft")
    Set objFD = objItem.FormDescription
    objFD.DisplayName = "IPM.Appointment.CAppointment"
    objFD.PublishForm = olPersonalRegistry

    but this script will publish the form to the Personal Library, and the user will need to select it from the New Item --> More Items-->Choose form --> navigate to Personal Library and then select it.

    My manager want it to be as if its direct published to user calender
    so the user will select the Calender --> New Item --> Custom form and then select the for I made.

    what should I do in this script to publish the custom form direct to the user Calender Folder


    Faris Mlaeb

    Tuesday, June 04, 2013 4:25 PM

Answers

  • Hi Faris,

    Thank you for posting in the MSDN Forum.

    You can refer to PublishForm Method page in which you'll see the code below.

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNameSpace("MAPI")
    Set myFolder = _
        myNameSpace.GetDefaultFolder(olFolderContacts)
    Set myItem = myOlApp.CreateItem(olContactItem)
    Set myForm = myItem.FormDescription
    myForm.Name = "My Contact"
    myForm.PublishForm olFolderRegistry, myFolder

    You can get the olFolderCalendar first and then publish your form there. Once the form been published to Calendar folder, you'll be able to see it in from New Items -> Custom Forms.

    Hope it helps.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 06, 2013 8:06 AM
    Moderator

All replies

  • Do you mean you want customize the dropdown menu of "New Items" button in Calender view?


    John

    Wednesday, June 05, 2013 1:33 PM
  • No, 

    This is what I want to do, Publish the custom form to all users calender



    Faris Mlaeb

    Wednesday, June 05, 2013 10:21 PM
  • Hi Faris,

    Thank you for posting in the MSDN Forum.

    You can refer to PublishForm Method page in which you'll see the code below.

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNameSpace("MAPI")
    Set myFolder = _
        myNameSpace.GetDefaultFolder(olFolderContacts)
    Set myItem = myOlApp.CreateItem(olContactItem)
    Set myForm = myItem.FormDescription
    myForm.Name = "My Contact"
    myForm.PublishForm olFolderRegistry, myFolder

    You can get the olFolderCalendar first and then publish your form there. Once the form been published to Calendar folder, you'll be able to see it in from New Items -> Custom Forms.

    Hope it helps.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 06, 2013 8:06 AM
    Moderator
  •  

    Good day,

    This is the error message I got when I try to run the scipte


    Faris Mlaeb

    Sunday, June 23, 2013 9:04 PM