How To Reset/Set Any Office Application Save As Path via Interop?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ronnysaid
    New Member
    • Jan 2009
    • 7

    #1

    How To Reset/Set Any Office Application Save As Path via Interop?

    Dear All,

    I was wondering if there is a way to reset the "Save As dialog" initial path when the user clicks on Save as from the menu.

    As an example, if you opened a workbook from interop (C#, VB,.....) then manually opened the excel menu and clicked save as, the path displayed is the same one where the workbook got opened, is there a way to reset that path or set it differently??

    Thanks.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    saveFileDialog1 .InitialDirecto ry = "C:\\testin g";

    Comment

    • ronnysaid
      New Member
      • Jan 2009
      • 7

      #3
      i'm sorry, im not following, SaveFileDialog is a .Net winforms class, and your code referes to an instance of that class and setting the path there. so how it fits in here????

      What i want to do is to use Microsoft.Offic e.Interop.Excel .dll version 12 to set the path of the "Excel 2007 save as dialog" incase if the user clicked save as, the path set earlier to be shown.

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        My mistake. I thought you were writing a C-Sharp program that writes Excel files programmaticall y. So I thought you were looking to change the InitialDirector y of a native SaveFileDialog.

        Comment

        Working...