title: Get folder path within c# application
body: <p>I am trying to retrieve folder flags that is within my aplication like shown in printscreen how do i do that </p>
  
  <p><img src="https://i.stack.imgur.com/kkCdF.png" alt="enter image description here"></p>
  
  <p>I tried the below code but doesnt work for me as it gives me c:\ location whereas my project is in d drive</p>
  
  <pre><code>   private void Countryflag_SelectionChanged(object sender, RibbonControlEventArgs e)
      {
          PowerPoint.Application ppApp = Globals.ThisAddIn.Application;
          PowerPoint.SlideRange ppslr = ppApp.ActiveWindow.Selection.SlideRange;
          string id = Countryflag.SelectedItem.Label;
          int countlargest = ppslr.Shapes.Count;
          PowerPoint.Shape shapepic = ppslr.Shapes[countlargest];
  
  
          String programfilesPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
             // Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
          //String msOfficePath = "Microsoft Office\\Document Themes 14";
          String msOfficePath = "~\\NepaAddintool\\Flag\\allflags\\";
          String fullPath = Path.Combine(programfilesPath, msOfficePath);
          string imagename = id + ".gif";
  
          String themePresentationPath = fullPath + "\\" + imagename;
  
         // ppslr.Shapes.AddPicture(themePresentationPath, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, shapepic.Left, shapepic.Top, shapepic.Width, shapepic.Height);
        ppslr.Shapes.AddPicture(themePresentationPath, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, 803, 35, 86, 56);
      }
  </code></pre>