Click to See Complete Forum and Search --> : Want to edit the Places Bar of Save As dialog box of MS office.


akbbhatt
August 27th, 2008, 05:07 AM
I am trying to open up a "Save As dialog box" in word using c#. I can open the dialog box fine, but i need to modify the Places Bar. I want to remove everything except My Network Places from the Places Bar. anybody please help me out.



Microsoft.Office.Interop.Word.Application wordap = applicationObject as Microsoft.Office.Interop.Word.Application;


Microsoft.Office.Interop.Word.Dialog oDlg = wordap.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFileSaveAs];


object[] oArgs = new object[1];

oArgs[0] = (object)@"test.doc";

oDlg.GetType().InvokeMember("Name", BindingFlags.SetProperty, null, oDlg, oArgs); its working for "Name" , fine.

Here similarly if i do like- InvokeMember("Places bar", indingFlags.SetProperty, null, oDlg, oArgs);

its not working. how can i modify the links on Places Bar???

please help me with this.

thanks a lot.

HanneSThEGreaT
August 27th, 2008, 10:43 AM
I stand corrected, but I doubt that you can do it through the InvokeMember etc.

Those boxes are "system boxes". You could perhaps have a look here, it may help :
http://msdn.microsoft.com/en-us/magazine/cc300434.aspx

Even if you do come right, I feel that this whole re inventing a wheel that works, is not the right approach - think of the users, they will expect certain things to be there, as taught in all the books.

Just my opinion.

akbbhatt
August 28th, 2008, 12:42 AM
thanks a lot for u reply.
I want to Publish one word document. For that, one Save as dialog box will be displayed. In Xp it will show only My Network Places in the Places Bar. But in Vista its showing all other icons like my documents, My Computer etc. Actually we are going to save the document in some server machine while Publishing, and the user is not allowed to save it in de local machine. So there is no need of Icons otherthan My Network Places.

i understood that i can do it by changing in registry. But actually i want it only in this particular save as dialog box. It should not effect the whole exisiting application.
So is there any other way to accomplish this.

thanks.