Publish custom form from an add while outlook starting?

T

tomer

Hi,
I am trying to publish a custom form,from my add in when it is first
activated,
But instead of "IPM.Contact.MyContact"
i get "IPM.Contact"

If i am shutting down outlook and run it again(i only publish it on the
first time) i can load the correct
type.

Is there a known problem publishing forms from the add in?
I did it because my installation program doesnot support a script.

Thanks in advance.


'Publish

Set olItem = golApp.CreateItemFromTemplate("MyContact.OFT")
Set myForm = olItem.FormDescription
myForm.Name = "MyContact"
myForm.publishForm olPersonalRegistry
olItem.Close olDiscard
Set myForm = Nothing
Set olItem = Nothing


'Load

Set myNameSpace = golApp.GetNamespace("MAPI")
Set Infs = myNameSpace.GetDefaultFolder(olFolderInbox).Parent
Set MyFolder = myNameSpace.Folders(Infs.Name)
Set Infs = Nothing
Set MyFolder = MyFolder.Folders("My Contacts")
Set NewContact = MyFolder.Items.add("MyContact")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top