CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    2

    Unhappy Want to edit the Places Bar of Save As dialog box of MS office.

    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.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Want to edit the Places Bar of Save As dialog box of MS office.

    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.

  3. #3
    Join Date
    Aug 2008
    Posts
    2

    Re: Want to edit the Places Bar of Save As dialog box of MS office.

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured