I ran your code, without any changes, and don't see any problems. After
running your program I can use Explorer and select iProperties from the
context menu for that file. On the Summary tab the Company field now has
"The ACME Company". So, your program updated the properties.
-Brian
"Randall A. Maxey" wrote in message
news:86EC4E4165FE52FCE3B3D9958CEDEE7D@in.WebX.maYIadrTaRb...
> Okay...I give up...
>
> What's wrong with the following code? I can't get the properties to
update.
>
> Thanks in advance.
>
> --Randy
>
> ==========Begin Code Here==================
>
> Private Sub cmdUpdateProps_Click()
> '
> 'Display Name: Summary Information
> 'Internal name: {F29F85E0-4FF9-1068-AB91-08002B27B3D9}
> '
> 'Display name: Document Summary Information
> 'Internal name: {D5CDD502-2E9C-101B-9397-08002B2CF9AE}
> '
> 'Display name: Design Tracking Properties
> 'Internal name: {32853F0F-3444-11D1-9E93-0060B03C1CA6}
> '
> 'Display name: User Defined Properties
> 'Internal name: {D5CDD505-2E9C-101B-9397-08002B2CF9AE}
>
> ' Declare the Apprentice object
> Dim oApprentice As New ApprenticeServerComponent
>
> ' Open a document using Apprentice
> Dim oApprenticeDoc As ApprenticeServerDocument
> Set oApprenticeDoc = oApprentice.Open(lblFileName.Caption)
>
> ' Obtain the PropertySets collection
> Dim oPropsets As PropertySets
> Set oPropsets = oApprenticeDoc.PropertySets
>
>
> ' Summary Information
>
>
oPropsets.Item("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}").ItemByPropId(kCompa
> nyDocSummaryInformation).Value = "The ACME Company"
>
> ' Then FlushToFile to save properties
> oPropsets.FlushToFile
>
> oApprentice.Close
> Set oPropsets = Nothing
> Set oApprenticeDoc = Nothing
> Set oApprentice = Nothing
>
> End Sub
>
>