PC Review


Reply
Thread Tools Rate Thread

Displaying custom properties of a PDF DocumentItem

 
 
wclarke101
Guest
Posts: n/a
 
      11th Sep 2009
I'm using the PropertyAccessor.SetProperty method to set some custom
properties on DocumentItem objects in a MAPIFolder. I'm then displaying
these custom properties as columns in the folder view.

Where the DocumentItem is any MS Office document (Word, Excel, etc), then
the values of the custom properties display correctly in the columns of the
view. However, if the DocumentItem is an Acrobat PDF document, then the
property values are not being displayed at all in the view. Does anyone know
how to resolve this?

I'm using VSTO 2008 with Outlook 2007.

Thanks,
Wayne.
 
Reply With Quote
 
 
 
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      11th Sep 2009
What are the relevant snippet of your code?
What do you see on the MAPI level for teh good and bad document items (you
can look at theraw message properties using OutlookSpy - select the item in
Outlook, click IMessage button on the OutlookSpy toolbar).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"wclarke101" <(E-Mail Removed)> wrote in message
news:81DB71C9-3D32-4E8B-B111-(E-Mail Removed)...
> I'm using the PropertyAccessor.SetProperty method to set some custom
> properties on DocumentItem objects in a MAPIFolder. I'm then displaying
> these custom properties as columns in the folder view.
>
> Where the DocumentItem is any MS Office document (Word, Excel, etc), then
> the values of the custom properties display correctly in the columns of
> the
> view. However, if the DocumentItem is an Acrobat PDF document, then the
> property values are not being displayed at all in the view. Does anyone
> know
> how to resolve this?
>
> I'm using VSTO 2008 with Outlook 2007.
>
> Thanks,
> Wayne.



 
Reply With Quote
 
wclarke101
Guest
Posts: n/a
 
      14th Sep 2009
Here is the code I use to set the properties...

setProperty(objDocItem, "User", strUser)
setProperty(objDocItem, "Description", strDocumentName)

Here is the "setProperty" function being called above...

Sub setProperty(ByRef objDocumentItem As Outlook.DocumentItem, ByVal
strPropertyName As String, ByVal strPropertyValue As String)
Try
objDocumentItem.PropertyAccessor.SetProperty(SCHEMA_NAME &
strPropertyName, strPropertyValue)
Catch ex As Exception
LogError("setProperty(Outlook.DocumentItem, '" & strPropertyName
& "', '" & strPropertyValue & "') - Exception : " & ex.Message)
End Try
End Sub

And here is the View XML snippet for the two columns...

<column>
<heading>User</heading>
<prop>http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/User</prop>
<type>string</type>
<width>61</width>
<style>padding-left:3px;;text-align:left</style>
<editable>1</editable>
</column>
<column>
<type>string</type>
<heading>Description</heading>
<prop>http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Description</prop>
<width>200</width>
<style>padding-left:3px;;text-align:left</style>
<editable>1</editable>
</column>

No error is logged by the "setProperty" function. I can see the properties
have been set correctly when I use the IMessage feature of OutlookSpy, but
the values are not displaying in the columns of the view if the document is a
PDF.

Thanks,
Wayne.

"Dmitry Streblechenko" wrote:

> What are the relevant snippet of your code?
> What do you see on the MAPI level for teh good and bad document items (you
> can look at theraw message properties using OutlookSpy - select the item in
> Outlook, click IMessage button on the OutlookSpy toolbar).
>
> --
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -
> "wclarke101" <(E-Mail Removed)> wrote in message
> news:81DB71C9-3D32-4E8B-B111-(E-Mail Removed)...
> > I'm using the PropertyAccessor.SetProperty method to set some custom
> > properties on DocumentItem objects in a MAPIFolder. I'm then displaying
> > these custom properties as columns in the folder view.
> >
> > Where the DocumentItem is any MS Office document (Word, Excel, etc), then
> > the values of the custom properties display correctly in the columns of
> > the
> > view. However, if the DocumentItem is an Acrobat PDF document, then the
> > property values are not being displayed at all in the view. Does anyone
> > know
> > how to resolve this?
> >
> > I'm using VSTO 2008 with Outlook 2007.
> >
> > Thanks,
> > Wayne.

>
>
>

 
Reply With Quote
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      14th Sep 2009
When you select the property in the IMessage window in OutlookSpy, do you
see the right GUID matching that used in the view descriptor?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"wclarke101" <(E-Mail Removed)> wrote in message
news:43826756-2568-4467-B64A-(E-Mail Removed)...
> Here is the code I use to set the properties...
>
> setProperty(objDocItem, "User", strUser)
> setProperty(objDocItem, "Description", strDocumentName)
>
> Here is the "setProperty" function being called above...
>
> Sub setProperty(ByRef objDocumentItem As Outlook.DocumentItem, ByVal
> strPropertyName As String, ByVal strPropertyValue As String)
> Try
> objDocumentItem.PropertyAccessor.SetProperty(SCHEMA_NAME &
> strPropertyName, strPropertyValue)
> Catch ex As Exception
> LogError("setProperty(Outlook.DocumentItem, '" &
> strPropertyName
> & "', '" & strPropertyValue & "') - Exception : " & ex.Message)
> End Try
> End Sub
>
> And here is the View XML snippet for the two columns...
>
> <column>
> <heading>User</heading>
> <prop>http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/User</prop>
> <type>string</type>
> <width>61</width>
> <style>padding-left:3px;;text-align:left</style>
> <editable>1</editable>
> </column>
> <column>
> <type>string</type>
> <heading>Description</heading>
> <prop>http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Description</prop>
> <width>200</width>
> <style>padding-left:3px;;text-align:left</style>
> <editable>1</editable>
> </column>
>
> No error is logged by the "setProperty" function. I can see the
> properties
> have been set correctly when I use the IMessage feature of OutlookSpy, but
> the values are not displaying in the columns of the view if the document
> is a
> PDF.
>
> Thanks,
> Wayne.
>
> "Dmitry Streblechenko" wrote:
>
>> What are the relevant snippet of your code?
>> What do you see on the MAPI level for teh good and bad document items
>> (you
>> can look at theraw message properties using OutlookSpy - select the item
>> in
>> Outlook, click IMessage button on the OutlookSpy toolbar).
>>
>> --
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>> -
>> "wclarke101" <(E-Mail Removed)> wrote in message
>> news:81DB71C9-3D32-4E8B-B111-(E-Mail Removed)...
>> > I'm using the PropertyAccessor.SetProperty method to set some custom
>> > properties on DocumentItem objects in a MAPIFolder. I'm then
>> > displaying
>> > these custom properties as columns in the folder view.
>> >
>> > Where the DocumentItem is any MS Office document (Word, Excel, etc),
>> > then
>> > the values of the custom properties display correctly in the columns of
>> > the
>> > view. However, if the DocumentItem is an Acrobat PDF document, then
>> > the
>> > property values are not being displayed at all in the view. Does
>> > anyone
>> > know
>> > how to resolve this?
>> >
>> > I'm using VSTO 2008 with Outlook 2007.
>> >
>> > Thanks,
>> > Wayne.

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
editing DocumentItem properties Andreas Microsoft Outlook VBA Programming 4 30th Apr 2008 02:09 PM
Displaying Custom properties for items amitbhandari Microsoft Outlook Interoperability 0 2nd Jul 2007 01:45 PM
displaying descriptions for properties of custom user controls =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= Microsoft C# .NET 4 28th Jun 2007 03:38 AM
i am having problem displaying the custom properties siddhant.raizada@gmail.com Microsoft Excel Misc 1 30th Nov 2006 04:27 PM
readonly properties when displaying an object's properties in propertygrid movieknight@gmail.com Microsoft VB .NET 0 14th May 2006 06:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:21 AM.