Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wd2k7 built-in Advanced Document Properties dialog?

Status
Not open for further replies.

jgherbert

Programmer
Feb 2, 2007
4
US
I need to create a ribbon button in W2k7 that opens the advanced document properties dialog, and I'm thinking that using a brief VBA macro should be the easiest way. I can add this function to the quick access toolbar, but can't find a reference to it in VBA as one of the wdDialog values.

Any ideas? TIA.
 
Hmmm...

The Properties Dialog is number 750 but it doesn't seem to like running from a macro.

However you can add the dialog directly to the QAT ...

Office Button > Word Options > Customize
In the "Choose commands from" dropdown, select "Commands not in the Ribbon"
Then you can select "Advanced Document Properties" and Add it to the Ribbon

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
*nod* You're right thank you - 750 is it, and "Dialogs(750).Show" definitely shows the dialog box, but you get weird results when you press Ok or Cancel to clear it.

Strange...! I shall keep testing. May I ask how you found that it was 750?
 
Ok, so to sum up when you press:

OK - the application is fine, but loses focus
Cancel - you get a runtime error

Weird. The problem with the QAT is that I need this to be installed on every machine that gets these macros installed, and really I wanted everything grouped together on my custom ribbon.
 
Hey Tony, I want to know how you found 750 as well.

I went through every single wdDialogxxxxxxxx in the Object Browser and there is no 750. Yet 750 works.

Come on, give it up. I have been trying to get that dialog for a while.

Gerry
My paintings and sculpture
 
With apologies to W S Gilbert, I've got a little list!

It's not perfect, or even complete, but it helps. I got the original by coding something like ..

on error resume next
For i = 1 to lots
[doc].insertparagraphafter
[doc].insertafter i & vbtab & dialogs(i).commandname
next


You do get some funnies with the Outlook OMG, and not all dialogs are valid in all circumstances but, as I said, it helps.

-------------------------

I don't know particularly about installation but QAT customizations are held in (documents & settings\userid)\Local Settings\Microsoft\Office\Word.QAT (I hope I've translated my Vista file structure to XP equivalent correctly). I find it interesting that they are held locally and not in the roaming profile - I have no idea why they think that's appropriate and I can see it being a real pain for some people.



Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top