Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Word Property Demotion Not Working if the property already has a value

  Asked By: Leland    Date: Nov 28    Category: Sharepoint    Views: 1873

We're using some VB code (see below) to checkout a Word document, update
some properties and then checkin and publish the document. Everything
is working except the Title and Author properties in the document itself
are not being set. Plex is showing us that the proper WSS properties
are being set but they aren't then being demoted into the Word doc
itself if the corresponding Word field already has a value.

However, if we manually checkout the doc, delete the existing values for
the Title and Author properties in our Word doc, our code works fine
(i.e. all of the properties are being set as we'd expect including the
Title and Author fields).

When we programmatically try to set Title and Author to "" and Save, it
doesn't work ...we see the same problem ... the corresponding WSS
properties are set but they are not being demoted to the Word doc

We've tested this on two different servers with the same results:

1. W2K Advanced Server + SPS SP1 + Office XP
2. W2L Advanced Server + SPS + Office 2000

Any ideas?

Dim kDoc As New PKMCDO.KnowledgeDocument
Dim kVersion As New PKMCDO.KnowledgeVersion

Dim rs As ADODB.Recordset
Dim sWorkingCopyUrl As String

Set rs = kVersion.Checkout(gc_sWorkspaceUrl +
"/Documents/Gifts/Microsoft Tahoedoc")
sWorkingCopyUrl =

' look up URL of working copy

kDoc.DataSource.Open sWorkingCopyUrl, , adModeReadWrite

kDoc.ContentClass = gc_DocumentProfile

Dim sDebug as Now(); /* for debugging */

kDoc.Description = sDebug;

kDoc.Title = sDebug;

kDoc.Author = sDebug;

kDoc.Categories = Array(":GRS Summary Sheets", ":GRS Summary
Sheets:First Half")

kVersion.Checkin (gc_sWorkspaceUrl + "/Documents/Gifts/Microsoft
kVersion.Publish (gc_sWorkspaceUrl + "/Documents/Gifts/Microsoft

Set kDoc = Nothing
Set kVersion = Nothing



1 Answer Found

Answer #1    Answered By: Lynsey Carver     Answered On: Nov 28

Note: The error is not in the missing "." before "doc" in the checkout
command -- I caused that error as I was preparing this email message.