I would like to store akey / value pair into my presentation (basically a GUID to know if I have seen the file before). I know that excel and word have extended properties, which can be used to store this kind ofinformation. But I am unsure if I can store similar Information in a Powerpoint-Document? Could someone point me to the right documentation?

有帮助吗?

解决方案 2

I store key/value pairs in Shape.Tags. I can see them in X.pptx\ppt\tags\tag*n*.xml. Use VBA to save something there and you should be able to find it in the XML, or in the code generated by the Open XML SDK.

其他提示

To add to Oliver's response, shapes, slides and presentations can all have tags.

For example:

Sub Example()
  With ActivePresentation
    .Tags.Add "SEENBEFORE", "YES"
  End With
End Sub

Sub AnotherExample
  With ActivePresentation
    If .Tags("SEENBEFORE") = "YES" Then
        MsgBox "I've seen it all before."
    End If
  End With
End Sub
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top