I am trying to Unlock a Label inserted as a Header, HowTo Do this?
The above explains what a policy label is, Its part of MS-Office 2007, 2007 introduced the lock/unlock aspect. The method I describe above is similiar to WordBasic.UnlockPolicyLabel Command thru VSTO. The code I provided shows how to perform this action in Visual Studio using a language called C# (C-Sharp). Since you wrote previously using this form of code (InvokeMember) from a GetType() Object I thought you may be familiar with how to pass the Accept, Enter or return to OK the dialog this call makes when word is automated.
The link above shows the dialog you see when you try and unlock a Word-DOCx file that has a Label on it created using the Policy Label insert command in the ribbon bar.
I wrote you on a previous thread you may or may not have read that explains what I am asking: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/ede895ef-2112-4ada-b119-389fdf5a5372/ Somehow part of my reply got posted here out of context.
This is a Sharepoint feature that's not exposed in Word's object model (except over WordBasic, which means it's an unsupported, undocumented "back door"). And please note that WordBasic is not part of VSTO. VSTO is not "office interop", it's a specific technology for extending the UI of some Office applications. You'll find a bit more information in "Please Read First", if you're interested. The forum primarily supports the technology, not the Office applications. While we're always happy to provide help with the object model if we know the answer, this is not a place to get general support for developing against the Office applications.
I'm fairly certain you can't send the "button value" for a dialog box as part of PInvoke. If the method accepts parameters that affect whether the dialog box can be displayed those could be passed in the last argument of InvokeMember. To affect the dialog box the only thing you could use is SendKeys, but this is always tricky and never reliable.
You might try asking in the Sharepoint groups (or wherever you found this WordBasic command) if there are any parameters that can be passed that will suppress the dialog box.
Cindy Meister, VSTO/Word MVP