470,626 Members | 2,139 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,626 developers. It's quick & easy.

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.
Jun 7 '09 #1
3 2049
tlhintoq
3,525 Expert 2GB
saveFileDialog1.InitialDirectory = "C:\\testing";
Jun 8 '09 #2
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.Office.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.
Jun 8 '09 #3
tlhintoq
3,525 Expert 2GB
My mistake. I thought you were writing a C-Sharp program that writes Excel files programmatically. So I thought you were looking to change the InitialDirectory of a native SaveFileDialog.
Jun 8 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Tory Collum | last post: by
reply views Thread by frederick.the.fool | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.