Results 1 to 2 of 2
  1. #1
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Custom Properties (PPT 2000)

    Is there a way to reference custom (or built in) document properties within the presentation. If I was in word I would use a field code.
    Any suggestions?

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Custom Properties (PPT 2000)

    Catherine,

    I'm not aware of any ppt equivalent to a word field to get at properties, at least not in ppt 2000.

    You can create a macro that does the following:
    1. add a new property - essentially a 1 liner
    ActivePresentation.CustomDocumentProperties.Add Name:="fredprop2", LinkToContent:=msoFalse, _
    Type:=msoPropertyTypeNumber, Value:=34

    2. put the value of a property into a new text box, such as
    <pre> ActiveWindow.Selection.SlideRange.Shapes.AddTextbo x(msoTextOrientationHorizontal, _
    55.25, 212.375, 211.125, 36#).Select
    ActiveWindow.Selection.ShapeRange.TextFrame.WordWr ap = msoTrue
    ActiveWindow.Selection.ShapeRange.TextFrame.TextRa nge.Characters(Start:=1, _
    Length:=0).Select
    With ActiveWindow.Selection.TextRange
    .Text = ActivePresentation.CustomDocumentProperties("fredp rop2").Value
    With .Font
    .Name = "Times New Roman"
    .Size = 24
    .Bold = msoFalse
    .Italic = msoFalse
    .Underline = msoFalse
    .Shadow = msoFalse
    .Emboss = msoFalse
    .BaselineOffset = 0
    .AutoRotateNumbers = msoFalse
    .Color.SchemeColor = ppForeground
    End With
    End With
    ActiveWindow.Selection.Unselect
    End Sub

    </pre>


    above was done by recording 2 macros, except for the key stmt that assigns the value of fredprop2 as the text for the textbox.

    One would probably want some more control for searching the properties to find a particular one. I know there have such posts on the word lounge since I used those in the past and probably had one of my own.

    Fred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •