Free Support Forum - aspose.com

How to write custom properties to a presentation

In Aspose.Words, you can write custom document properties. I have found no way to do the equivalent in Aspose.Slides. I've found several postings that asked about it. Some postings suggested it would be implemented, and several that said it hasn't been implemented. One referred to documentation that hinted to this capability, but someone posted that it was wrong.

So, is this feature available? If not, why not?

Hi,

You can use Presentation.DocumentProperties to achieve this. For more information, visit this link.

So, that link contained documentation on the READ ONLY property. I’m asking how to WRITE document properties. If this feature is not avialable, I am wondering why it isn’t. Is there technical challenge that has prevented Aspose from making this feature available?

Hi,

There is no such issue. You can use the following code for writing custom document properties:

Presentation pres = new Presentation("asposepara2.ppt");

pres.DocumentProperties.Author = "M Sabir";

pres.DocumentProperties.Category = "My Categoy";

pres.DocumentProperties.Comments = "My Comments";

pres.DocumentProperties.Company = "Aspose Solutions Intl";

pres.DocumentProperties.CreateTime = DateTime.Now;

pres.Write("asposepara2_1.ppt");

Those are the standard “built in” document properties. How would I write a CUSTOM document property that doesn’t previously exist? For example, if I wanted to add a new property called “Type”, how would I do that?

Hi,

You can set custom properties in the following way:

pres.DocumentProperties["Type"] = "My Type";