link property fields

C

Cloud

i am trying to link the property fields of powerpoint template with the
current text fields on the template.

such as
Title:
Subject:
Author:
Manager:
these fields to be editted so it shows up in the template text fields?

or is this not possible?
 
S

Shyam Pillai

Could you elaborate more on this? I am pretty certain what you are trying to
achieve isn't supported by PowerPoint however your description isn't
entirely clear.
 
C

Cloud

Basically what i want to do is, when i change the property fields it will
change the fields in the text boxes on the template, so it will link between
the 2 of them.
So if i change the add a title in the property, it will show in the text box
 
S

Shyam Pillai

You cannot do it dynamically since Powerpoint does not expose any events
when the properties are changed.
To example code to transfer the properties to a slide is shown below.

'-------------------------------------------------------------------------
Sub CreateSlideFromProperties()
Dim oSld As PowerPoint.Slide
Dim oShpTitle As PowerPoint.Shape
Dim oShp As PowerPoint.Shape

Set oSld = ActivePresentation.Slides.Add(1, ppLayoutTitle)

' Title placeholder
Set oShpTitle = oSld.Shapes.Placeholders(1)
' Body placeholder
Set oShp = oSld.Shapes.Placeholders(2)

With ActivePresentation.BuiltInDocumentProperties
oShpTitle.TextFrame.TextRange.Text = .Item("title").Value
oShp.TextFrame.TextRange.Text = "Author: " & .Item("author").Value & _
vbNewLine & "Subject: " &
..Item("subject").Value
End With

End Sub
'-------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top