PDA

View Full Version : Get file properties



Fausto Saito
08-13-2015, 04:08 AM
Hi!
I'm working with ppt files that are loading in the Microsoft Sharepoint. I'm trying to show in the first slide some informations about properties of the file (like author, file name, date, etc.). I'm using this code:

ActivePresentation.Slides(1).Shapes("Label1").OLEFormat.Object.Caption = Application.ActivePresentation.BuiltInDocumentProperties.Item("Author").Value

However, my ppt file from sharepoint, has others particularly properties that are inputted when we created them in the sharepoint. One of them (VPPS) is inputted by a combobox list. So I'm using the code:

ActivePresentation.Slides(1).Shapes("Label2").OLEFormat.Object.Caption = Application.ActivePresentation.ContentTypeProperties.Item("VPPS").Value

And, the others properties are inputted by a textbox (Single line of text and Multiple line of text) and by a question of multiple choice. I would like to know how could i show these properties in a label. I'm not sure, but i guess that it's related to type of variable. Someone could help me?

Thanks in advance!

Paul_Hossler
08-13-2015, 07:19 AM
1. Does



ActivePresentation.Slides(1).Shapes("Label2").OLEFormat.Object.Caption = Application.ActivePresentation.ContentTypeProperties.Item("VPPS").Value


work?

2. What happens if you use



ActivePresentation.Slides(1).Shapes("Label88").OLEFormat.Object.Caption = Application.ActivePresentation.ContentTypeProperties.Item("SomeTextBox").Value
ActivePresentation.Slides(1).Shapes("Label99").OLEFormat.Object.Caption = Application.ActivePresentation.ContentTypeProperties.Item("MultipleChoice").Value



3. Is there a 1 or 2 slide presentation you can post?

Fausto Saito
08-13-2015, 10:23 AM
Hi Paul!

Answering your questions:

1) Yes! the code works to get the variable "VPPS".

2) If I use the same code to get the variable "SomeTextBox", appears this message box error:

14157
"Method 'Value' of object 'MetaProperty' failed

If I use the same code to get the variable "MultipleChoice", appears this message box error:

14156
"Type mismatch"

Thanks in Advance!

Paul_Hossler
08-13-2015, 03:25 PM
in 2), you did change the names I just made up (SomeTextBox and MultipleChoice) to real ones?

Fausto Saito
08-14-2015, 04:26 AM
Yes Paul! I changed to real ones!

Paul_Hossler
08-14-2015, 06:13 AM
Just checking :devil2:

But other than just my simple guess, I don't have any other suggestions for you

If you have a small sample you can post, others might have some ideas

Fausto Saito
08-17-2015, 10:56 AM
Ok Paul!

Thank you for trying!