views:

667

answers:

2

Using Office automation in Word 2007, I view the Document Information Panel, showing me properties of a document that resides in a SharePoint location.

Using VS 2008, I interrogate the following in the Immediate Window:

? WordDocument.CustomDocumentProperties(23).Value
"My App Name Here" {String}
    String: "My App Name Here"

Then I interogate the name of the property:

? wordDocument.CustomDocumentProperties(23).Name
"Process Name" {String}

When I type into the combobox and change the value to "YYY" and query the value of tghe property:

? WordDocument.CustomDocumentProperties(23).Value
"YYY" {String}
    String: "YYY"

However, when I execute the following:

WordDocument.CustomDocumentProperties(23).Value = "New Value" and requery the value of the property I see that the value was stored:

? WordDocument.CustomDocumentProperties(23).value
"New Value" {String}
    String: "New Value"

..but I don't see a corresponding change to the screen.

I do however see that, on Advanced Properties/Custom Tab that a Custom Property by the name of "Process Name" has been recorded with the value "New Value"

There seems to be some kind of one way mapping going on between "server" and "custom" properties, but the really strange part is:

I can update SOME server properties, others I cannot.

I don't know a darn thing about SharePoint, other than as a dumb user. And getting any help from a SharePoint admin in my company is probably a very long shot...

I checked all of Word's Built-in Properties and Custom Properties, I decided that none of them can be used to update the "Process Name" "server" property.

How can I update this stubborn property? Most of the server properties I can update, a few I cannot.

I see some articles referring to using what looks like "SharePoint objects." Do I need to download an SDK just to populate these properties? So far I've used Office automation, because I am running locally on the user's PC and pre-filling documents using the Word object model.

All that is left is to finish populating the last couple of server properties after I copied the doc to a Sharepoint folder.

A: 

Dude....

Quit banging your head and get a Mac!

Velika
Hmmm....There's an angle I didn't consider.
Velika
Macs can still upload to SharePoint...
Nat
A: 

Your issue comes from how SharePoint maps its properties to the Office 2007 document and vice-versa.

Ideally you would navigate to the web site and list of where your document is stored. (e.g. shortent http://intranet/[somesharepointstuff]/mydocument.docx to http://intranet/[somesharepointstuff]).

If a page display, you will be able to find your document and edit some properties there hopefully.

This ability to edit the document may depend on your security access.

Doing this will allow you to "see" what properties of the document are setup to be editable by uses and which are not.

Nat
I navigated to teh sharepoint site, located the Word doc and edited the "Process Name" document property via the Sharepoint web site. This updated both the (server) document property and the custom document property. However, I can query the proeprty from code and see the change to the property value, but updating the property does not change the screen value and ultimately the property stored to sharepoint.end result: No cigar.Thanks for trying.I might go for that Mac after all, it seems.
Velika
can you explain "but updating the property does not change the screen value and ultimately the property stored to sharepoint" in a bit more detail in your question?
Nat
Sure. When I update a property through the Sharepoint web site doc properties interface or if I set it from within Word via the window for setting document serevr properties, I see the change of value reflected when I display the property in code via the following code in the immediate window:WordDocument.CustomDocumentProperties(23).value..But when I set the value of this property via code, it does not change the value displayed in Sharepoint web/doc properties window, only in the *CUSTOM* property window.However, if I pick another sibling property, it does work.
Velika
If I get any additional follow up queries, I'll send a link to a short video debugging session.
Velika