473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.

thank you.
Aug 26 '08 #1
7 1378
please help me guys...
Aug 26 '08 #2
Plater
7,872 Expert 4TB
This requires using win32_api, I remember seeing how it was done once, but not where or how.
I would try in either the c/c++ or windows forum.
Aug 26 '08 #3
Can't really help you with your problem but I just recently did this for the normal Save As dialog box (the one Notepad etc use) and the way I ended up doing it was by the Registry. Here's an export of the keys:

Expand|Select|Wrap|Line Numbers
  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\PlacesBar]
  4. "Place0"=dword:00000000
  5. "Place1"=dword:00000011
  6. "Place2"=dword:00000005
  7. "Place3"=dword:00000012
  8. "Place4"="\\\\Sicilly\\d$"
Might at least help get you in one possible direction. By the way this key can also be done in LOCAL_MACHINE iirc.
Aug 26 '08 #4
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.wdDialo gFileSaveAs];


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.
Aug 27 '08 #5
Plater
7,872 Expert 4TB
Well I can go ahead and say I doubt that a member variable would have a space in it.
Have you checked the API on that object to see what member variables ARE there?
Aug 27 '08 #6
Well I can go ahead and say I doubt that a member variable would have a space in it.
Have you checked the API on that object to see what member variables ARE there?
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.
Aug 28 '08 #7
Plater
7,872 Expert 4TB
What Is was getting it is that
"Places bar" doesn't sound like a valid member name
"placesbar" or "PlacesBar" -might- be.
So you would do this:
InvokeMember("PlacesBar", indingFlags.SetProperty, null, oDlg, oArgs);

But what I really think is that you should go look up the ms office API for the object that oDlg is
Aug 28 '08 #8

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

Similar topics

5
by: j.mandala | last post by:
Someone is trying to run my Access 2002 database under Access 2003. He has had a number of problems: 1) i used the MSComCt2.ocx for it's Date and Time picker. I can't find it under 2003. Do I...
8
by: deko | last post by:
What is the best way to get a Common Dialog in Access 2000 Standard Edition? Microsoft suggests this: Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA"...
3
by: Tim::.. | last post by:
Can someone tell me how I get the correct selected office in my drop down list when I enter edit mode. At the moment it just defaults to the office at the top of the drop down list rather than...
21
by: iwdu15 | last post by:
how can i create a code to make my program create an rtf file? heres what i have so far, any help would be appreciated: Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As...
0
by: artofsuntzu | last post by:
I am trying to use Win32 API in Visual Basic 6.0 to get the text from a third party program that is using an Edit Control Window within a #32770 DialogBox. But I am unable to find any SendMessage...
2
by: torbjorn.maro | last post by:
I'm the developer of an enterprise level web application that among other things handles documents. The documents are stored in a database. There is now simple functionality to check out and...
1
by: sainathparuchuri | last post by:
As a project requirement we need to convert word documents to tiff images. We have been using Microsoft Office Document Image Writer (MODI) for this puspose and doing absolutely well. But now this...
4
by: dantebothermy | last post by:
I have an Access form with multiple tabs; the underlying table is in SQL Server. The problem comes up when I edit and save a record on tab 1, then go to tab 2 to to edit a different field of the...
1
by: giulio8 | last post by:
Hello, I'd appreciate your suggestions about this drafted application for video editing. It is just the first idea, it is (barely) working but can be improved a lot! Find the code attached below....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.