none
Is there a way to get DefaultFilePath in a powerpoint add-in RRS feed

  • Question

  • I want to install custom templates so they appear under File -> New -> My Templates. (%appdata%/microsoft/templates). Therefor I need to know the templatepath
    I'm looking for something like 'Application.Options.DefaultFilePath(Word.WdDefaultFilePath.wdTemplatePath)' as is used in a word add-in. This isn't in the API but is there another way? Or is it confirmed that this is not possible in a powerpoint add-in.

    I can't use %appdata% and concatenate 'microsoft' and 'templates' because I have to deploy to multiple languages. (folder 'templates' has a different name in other languages)

     thx

    Marco

    Monday, May 16, 2011 8:32 AM

Answers

  • HI Marco,

    have a look at the RegistryValues under

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\General

    There's a ApplicationData and a Template entry.

    in .Net you also can say:

    Environment.GetFolderPath(System.Environment.SpecialFolder.Templates);
    
     Greets - Helmut


    Helmut Obertanner [http://www.obertanner.de] [http://www.outlooksharp.de]
    Monday, May 16, 2011 10:47 AM
    Answerer

All replies

  • HI Marco,

    have a look at the RegistryValues under

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\General

    There's a ApplicationData and a Template entry.

    in .Net you also can say:

    Environment.GetFolderPath(System.Environment.SpecialFolder.Templates);
    
     Greets - Helmut


    Helmut Obertanner [http://www.obertanner.de] [http://www.outlooksharp.de]
    Monday, May 16, 2011 10:47 AM
    Answerer
  • Hi Helmut,

    Thank you for your answer. I'll try the registryvalues solution

    Marco 


    thx, Marco
    Tuesday, May 17, 2011 10:11 AM
  • Why can't you find the DefaultFilePath entry for the PowerPoint as you can with Word, should be equal I could think? Is there a way to get the User Template location for PowerPoint similar to what you do for Word in VSTO or how are you expected to handle PowerPoint template paths via code?

    In Word it can be retrieve it by and it would be really convenient if it was equal across PowerPoint, Excel etc:

    Globals.ThisAddIn.Application.Options.DefaultFilePath[MSWord.WdDefaultFilePath.wdUserTemplatesPath]

    /Adam


    -- Adam Andersson --


    Monday, March 13, 2017 8:49 AM