Create Your Own Outlook Forms Installer

Create your own Outlook forms installer, with only two objects: A DocSiteControl A Command button Put the form that you want to install in the DocSiteControl, choose in which folder you want to install the form and change it in code. Very useful to deploy to users. ========== = CODE = ========== Option Explicit Dim TopFolder dim oPage Dim MyItem Dim FD sub Item_Open dim MyAtt Dim oCurrentFolder Dim c set oPage = Item.GetInspector.ModifiedFormPages("Installer") set MyAtt = Item.Attachments if MyAtt.Count>0 then MyAtt.Item(1).SaveAsFile "c:\i.oft" 'set MyItem = Application.CreateItemFromTemplate("c:\i.oft",oCurrentFolder) set c = oPage.Controls end if end sub sub cmdProcess_Click Dim olNS Dim MyFolder Dim MyItem Dim MyForm Set olNS = Item.Application.GetNamespace("MAPI") Set MyFolder = olNS.GetDefaultFolder(6) '6=olFolderInbox Set MyItem = Application.CreateItemFromTemplate("c:\i.oft",MyFolder) Set MyForm = MyItem.FormDescription MyForm.Name = "CI Outros Clientes" MyForm.PublishForm 3, MyFolder '3=olFolderRegistry Item.Close 1 '1=olDiscard end sub

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.