Opening Custom Outlook Forms

Discussion in 'Software' started by gr00m, Aug 14, 2006.

  1. gr00m

    gr00m Private E-2

    I've created several custom outlook forms for our company and I'm searching for an easy way to access them. The only way I know to open them is to do "New -> Choose Form..." then browse to the form library and select the form.

    This is simple enough for me, though a bit bothersome, but to others in the company it seems to be confusing. So what I'm searching for is a one click solution that will launch the form.

    What I've come up with is to create a custom toolbar with buttons that can directly access the forms. I can add a URL to the button with the form path, however here's the problem. So far I can only point to the physical template file (.oft), but inorder to open and get the correct output I need to access the actual published template. This is difficult to explain, though I'm hoping anyone that could help me knows what I'm talking about.

    I've spent numerous hours searching for something like this with no luck. The only thing I could come up with is saving the template as a .fdm, however the tutorial was for Outlook 97 and almost nothing matched up with Outlook 2003.
     
  2. Matacumbie

    Matacumbie Rocky Top

  3. gr00m

    gr00m Private E-2

    That site was perfect! Im 98% done but need just a little bit more help.

    I created a macro with the following code:

    Sub RunMyForm()
    Dim myOlApp as Application
    Dim myNameSpace as Namespace
    Dim myFolder as MAPIFolder
    Dim myItems as Items
    Dim myItem as Object

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNameSpace("MAPI")
    Set myFolder = _
    myNamespace.GetDefaultFolder(olFolderNotes)
    Set myItems = myFolder.Items
    Set myItem = myItems.Add("IPM.Note.MyForm")
    myItem.Display

    Set myOlApp = Nothing
    Set myNameSpace = Nothing
    Set myFolder = Nothing
    Set myItems = Nothing
    Set myItem = Nothing
    End Sub


    This works and opens anything published in my personal library, but I need to access forms published to a public folder. Is there anway to tweak this to access forms from a specific public folder?
     
  4. Matacumbie

    Matacumbie Rocky Top

  5. gr00m

    gr00m Private E-2

    Bingo! For anyone that might need this, here's the new modified code. This accesses a form called MyForm published to a folder called FormFolder in the following public directory Public Folders/All Public Folders/Form Folder.

    Sub MyForm()
    Dim myOlApp As Application
    Dim myNameSpace As NameSpace
    Dim myFolder1 As MAPIFolder
    Dim myFolder2 As MAPIFolder
    Dim myFolder3 As MAPIFolder
    Dim myItems As Items
    Dim myItem As Object

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Set myFolder1 = myNameSpace.Folders("Public Folders")
    Set myFolder2 = myFolder1.Folders("All Public Folders")
    Set myFolder3 = myFolder2.Folders("Form Folder")
    Set myItems = myFolder3.Items
    Set myItem = myItems.Add("IPM.Note.MyForm")
    myItem.Display

    Set myOlApp = Nothing
    Set myNameSpace = Nothing
    Set myFolder = Nothing
    Set myItems = Nothing
    Set myItem = Nothing
    End Sub
     
  6. Matacumbie

    Matacumbie Rocky Top

    Thank's for posting that, it might help someone else. Good job. :)

    Steve
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds