none
sample MS add-in only seems to work for previous version of VSTO :( RRS feed

Answers

  • You can add a shortcut button to a public folder in a NavigationModule by getting the NavigationGroups associated with the module and adding a shortcut to a folder. It's a relatively complex process.
     
    See http://msdn.microsoft.com/en-us/library/office/bb206757(v=office.12).aspx for a discussion on the structure of the NavigationPane. Randy's original article has some sample code showing how to get a specific module, in the case of his article the new SolutionsModule feature. Just get a Mail or Shortcuts module instead and navigate the module structure until you can create a button.
     
    Bear in mind though that for something like a public folder it might not be available when running in offline mode. Your code has to be prepared to deal with that. Perhaps by checking Exchange connection mode and online/offline status before creating the folder shortcut.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "jfalberg" <=?utf-8?B?amZhbGJlcmc=?=> wrote in message news:e15162eb-918c-44ef-89f7-b50773a16527...
    Apparently this sample seems to show me how to create a navigational button which essentially creates a folder if non-existant.  What I really need to accomplish is making a shortcut to a public folder on a navigational button so the end-user doesn't have to keep doing too many clicks nor scrolls.

    Ken Slovak MVP - Outlook
    Friday, October 12, 2012 8:42 PM
    Moderator
  • The error message is telling you that you cannot do what you want. You could only add a shortcut to a public folder as a shortcut in the Shortcuts pane, and that's not recommended as it would be different in online or offline modes or if the public folder isn't available.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "jfalberg" <=?utf-8?B?amZhbGJlcmc=?=> wrote in message news:681714ed-4c98-4949-b62b-557f481c2910...

    Another update as I'm trying to force this thing to work, but in my catch message line it indicates from:


            //Add the solution and hide folders in default modules
            solutionsModule.AddSolution(solutionRoot,
                Outlook.OlSolutionScope.olHideInDefaultModules);

    A default, special, or hidden folder cannot be added to or removed from the Solutions module


    Ken Slovak MVP - Outlook
    Tuesday, October 16, 2012 9:06 PM
    Moderator

All replies

  • As an update, copying and renaming

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools\
    Microsoft.VisualStudio.Tools.Office.targets

    as

    Microsoft.VisualStudio.Tools.Office.Office2007.targets

    got me further, but now I'm getting the following error message upon building solution:

    Unable to find manifest signing certificate in the certificate store. SolutionsModuleAddInCS

    This is getting beyond my understanding and want to know how I can at least get this sample to work so I can satisfy a requirement that's due by Monday.

    Friday, October 12, 2012 3:36 PM
  • Did you look at the Q&A tab at that download? It has that exact error you're seeing and the solution.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "jfalberg" <=?utf-8?B?amZhbGJlcmc=?=> wrote in message news:093a44a5-c890-49f6-a2f4-19560cb26b31...

    As an update, copying and renaming

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools\
    Microsoft.VisualStudio.Tools.Office.targets

    as

    Microsoft.VisualStudio.Tools.Office.Office2007.targets

    got me further, but now I'm getting the following error message upon building solution:

    Unable to find manifest signing certificate in the certificate store. SolutionsModuleAddInCS

    This is getting beyond my understanding and want to know how I can at least get this sample to work so I can satisfy a requirement that's due by Monday.


    Ken Slovak MVP - Outlook
    Friday, October 12, 2012 3:40 PM
    Moderator
  • Hmmm, just tried that, now the error message I get is:

    Error 1 "bin\Debug\SolutionsModuleAddInCS.dll;bin\Debug\SolutionsModuleAddInCS.dll" is an invalid value for the "EntryPoint" parameter of the "ResolveManifestFiles" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". SolutionsModuleAddInCS

    Friday, October 12, 2012 3:46 PM
  • About all I can suggest then is to create a brand-new empty VSTO project in VS 2010. Then make sure all the references in the original project are referenced in the new project and copy over the source code, creating any new classes or modules needed as you go.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "jfalberg" <=?utf-8?B?amZhbGJlcmc=?=> wrote in message news:46cc71a8-d21b-451d-a0e4-38de0f5adcaf...

    Hmmm, just tried that, now the error message I get is:

    Error 1 "bin\Debug\SolutionsModuleAddInCS.dll;bin\Debug\SolutionsModuleAddInCS.dll" is an invalid value for the "EntryPoint" parameter of the "ResolveManifestFiles" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". SolutionsModuleAddInCS


    Ken Slovak MVP - Outlook
    Friday, October 12, 2012 5:25 PM
    Moderator
  • I ended up installing VSTO 2008 rather than spinning my wheels with this.  So far it works this way as desired.  Very odd.   Hopefully I should be able to develop this in VSTO 2010 or newer in the future.
    Friday, October 12, 2012 6:18 PM
  • Apparently this sample seems to show me how to create a navigational button which essentially creates a folder if non-existant.  What I really need to accomplish is making a shortcut to a public folder on a navigational button so the end-user doesn't have to keep doing too many clicks nor scrolls.

    Edit,

    How can I reference the public folder similar to this following code that refers to the personal folder?:

            Outlook.Folder rootStoreFolder =
                Application.Session.DefaultStore.GetRootFolder()
                as Outlook.Folder;

    • Edited by jfalberg Friday, October 12, 2012 8:38 PM
    Friday, October 12, 2012 7:47 PM
  • You can add a shortcut button to a public folder in a NavigationModule by getting the NavigationGroups associated with the module and adding a shortcut to a folder. It's a relatively complex process.
     
    See http://msdn.microsoft.com/en-us/library/office/bb206757(v=office.12).aspx for a discussion on the structure of the NavigationPane. Randy's original article has some sample code showing how to get a specific module, in the case of his article the new SolutionsModule feature. Just get a Mail or Shortcuts module instead and navigate the module structure until you can create a button.
     
    Bear in mind though that for something like a public folder it might not be available when running in offline mode. Your code has to be prepared to deal with that. Perhaps by checking Exchange connection mode and online/offline status before creating the folder shortcut.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "jfalberg" <=?utf-8?B?amZhbGJlcmc=?=> wrote in message news:e15162eb-918c-44ef-89f7-b50773a16527...
    Apparently this sample seems to show me how to create a navigational button which essentially creates a folder if non-existant.  What I really need to accomplish is making a shortcut to a public folder on a navigational button so the end-user doesn't have to keep doing too many clicks nor scrolls.

    Ken Slovak MVP - Outlook
    Friday, October 12, 2012 8:42 PM
    Moderator
  • I was trying to use the variable pubStoreFolder similar to how rootStoreFolder is used as follows:

            Outlook.Folder rootStoreFolder =
                Application.Session.DefaultStore.GetRootFolder()
                as Outlook.Folder;
            Outlook.Folder pubStoreFolder =
                Application.Session.DefaultStore.GetDefaultFolder(Outlook.OlDefaultFolders.olPublicFoldersAllPublicFolders)
                as Outlook.Folder;

            Outlook.Folder rootStoreFolder =
                Application.Session.DefaultStore.GetRootFolder()
                as Outlook.Folder;
            Outlook.Folder pubStoreFolder =
                Application.Session.DefaultStore.GetDefaultFolder(Outlook.OlDefaultFolders.olPublicFoldersAllPublicFolders)
                as Outlook.Folder;

    But I couldn't seem to get it to work.  Is this intended shortcut to a public folder supposed to be done differently than the way I'm trying, or how can I get it to work.  I was supposed to have ready by today.

    edit:

    I updated my code as follows:

            Outlook.Folder pubStoreFolder =
                Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olPublicFoldersAllPublicFolders)
                as Outlook.Folder;
            //If solution root folder does not exist, create it
            //Note that solution root
            //could also be in PST or custom store
            try
            {
                solutionRoot =
                    pubStoreFolder.Folders("DM Rolodex")
                    as Outlook.Folder;

    but now I'm getting an error message for the above:

    Error 3 Non-invocable member 'Microsoft.Office.Interop.Outlook.MAPIFolder.Folders' cannot be used like a method. 

    I just need this to work as desired.

    • Edited by jfalberg Monday, October 15, 2012 2:07 PM update
    Monday, October 15, 2012 1:32 PM
  • Another update as I'm trying to force this thing to work, but in my catch message line it indicates from:


            //Add the solution and hide folders in default modules
            solutionsModule.AddSolution(solutionRoot,
                Outlook.OlSolutionScope.olHideInDefaultModules);

    A default, special, or hidden folder cannot be added to or removed from the Solutions module

    Monday, October 15, 2012 3:07 PM
  • The error message is telling you that you cannot do what you want. You could only add a shortcut to a public folder as a shortcut in the Shortcuts pane, and that's not recommended as it would be different in online or offline modes or if the public folder isn't available.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "jfalberg" <=?utf-8?B?amZhbGJlcmc=?=> wrote in message news:681714ed-4c98-4949-b62b-557f481c2910...

    Another update as I'm trying to force this thing to work, but in my catch message line it indicates from:


            //Add the solution and hide folders in default modules
            solutionsModule.AddSolution(solutionRoot,
                Outlook.OlSolutionScope.olHideInDefaultModules);

    A default, special, or hidden folder cannot be added to or removed from the Solutions module


    Ken Slovak MVP - Outlook
    Tuesday, October 16, 2012 9:06 PM
    Moderator