I am trying to get the installation path of ms word through my code so that I can put its icon in my excel sheet generated through my c# code.
Tried this but no luck.
Here I am trying to get the icon using the whole word installation oath which I know in my device but I want to generalize it.
worksheet.Shapes.AddOLEObject(Filename: @"C:\Users\BJS\Desktop\POC\wordFile.docx", Height: 80, Width: 90, DisplayAsIcon: true, IconFileName: @"C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE", IconIndex: 2, IconLabel: "WordFile", Top: _rng.Top, Left: _rng.Left);
Generalize the path which will work for all users