Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Apr 2001
    Location
    Germany, Hamburg
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PPT2K displaying doc_properties on master slides

    I need to display some document properties (Menu File>Properties) like title, company, author etc on the slide master. I know how to get them into VBA, but I don't know how to display them on a master like a buildin variable (date, pagenum).

    Any help would be highly appreciated.

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: PPT2K displaying doc_properties on master slides

    -------- Original Post <edited> ------------------------
    I need to display some document properties on the slide master.
    Peter

    -------- Reply -----------------------------------------

    Peter, I wasn't sure if you wanted the info placed in the footer or in a new textbox on the master, so I did both, plus used a custom doc property. Hope this helps! See code below. --Sam

    Sam Barrett, MTL Systems, Inc., mailto:sam@mtl.com
    Brainbench MVP, <A target="_blank" HREF=http://www.brainbench.com>http://www.brainbench.com</A>

    And the things that you have heard...commit these to faithful
    men who will be able to teach others also. 2 Timothy 2:2
    <pre>Sub makeMaster()
    Dim shpMaster As Shape
    With ActivePresentation.SlideMaster.HeadersFooters.Foot er
    .Text = ActivePresentation.BuiltInDocumentProperties("Auth or")
    .Visible = msoTrue
    End With
    Set shpMaster = ActivePresentation.SlideMaster.Shapes.AddTextbox _
    (Orientation:=msoTextOrientationHorizontal, Left:=30, Top:=497, Width:=125, Height:=40)
    shpMaster.Name = "shpDocProp" ' So you can find it later
    With shpMaster.TextFrame
    .TextRange.Paragraphs().ParagraphFormat.Bullet.Vis ible = msoFalse
    .TextRange.Text = ActivePresentation.CustomDocumentProperties("Dispo sition")
    .TextRange.Font.Size = 14
    End With
    End Sub
    </pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    New Lounger
    Join Date
    Apr 2001
    Location
    Germany, Hamburg
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PPT2K displaying doc_properties on master slides

    Sam, thanx a lot. This detailed answer to my unspecific question (putting the blame on me ;-) is very helpfull because indeed I need text boxes and footers on all kind of master master pages. Inspired by your examples it should be possible for me to figure out how to update a field on a title- or notes-master.

    May be it's a stupid question: where do I call the Code ???

    Is it OK to place a text box on the master and call the subroutine from their data property (how ?). Or do I have to place a "Update fields" button to the master to get the subroutines run on demand.

    I would prefer a solution, where the fields would be updated automatically when a presentation is opened and/or saved.

    I'm a VBA newbie. Sorry for asking simple questions.

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: PPT2K displaying doc_properties on master slides

    Peter, your question is not stupid. There are no stupid questions in Power Point. Its Object Model is horrific and handling events is worse. There is not a readily available Auto_Open or Auto_Close like Excel and Word: you have to write an AddIn, which I have not done, but here are some web resources for everything you never wanted to know about Power Point and programming (o: Have Fun [img]/forums/images/smilies/ohmy.gif[/img]) --Sam

    Steve Rindsberg Tips <A target="_blank" HREF=http://www.rdpslides.com/pptfaq/>http://www.rdpslides.com/pptfaq/</A>
    Shyam Pillai Tips <A target="_blank" HREF=http://www.mvps.org/skp/vba.htm#ppt>http://www.mvps.org/skp/vba.htm#ppt</A>
    David Foster Tips <A target="_blank" HREF=http://www.panix.com/~dfoster/prog/office/pptvba/index.html>http://www.panix.com/~dfoster/prog/o...vba/index.html</A>
    Power Point MVP
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    New Lounger
    Join Date
    Apr 2001
    Location
    Germany, Hamburg
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PPT2K displaying doc_properties on master slides

    Sam,
    I'm overwhelmed . You're absolutely right, the PPT object model is a mess. I'm used to Word and Excel, where many things related to VBA are much simpler to figure out.

    I gratefully appreciate your support

    Thanx alot.

  6. #6
    Lounger
    Join Date
    Jan 2001
    Location
    San Diego, California, USA
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PPT2K displaying doc_properties on master slides

    Your sample code works almost for PPT97. I was directed to this forum to find the answer to my question.

    I am trying to do something similar with the document properties, however, I wish to place the contents of the properties from each tab on a PowerPoint slide so I can better keep track of the multitude of revisions and statistics that swamp me weekly. I am a VB dummy and am willing to learn.

    I have found several examples of other code that show me how to add a slide, and add both path and filename or author... I am in need of something greater.

    Can you recommend a good resource to learn PowerPoint VB, like a book or video?.

    I am using both PP97 (home) and PP2K SR1 (work).
    I will appreciate any guidance in this endeavor.

    Thanks in advance,
    Ryan W.

  7. #7
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: PPT2K displaying doc_properties on master slides

    Ryan, The good news is that the code you need is back in your <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=ppt&Number=45228&page=0&vie w=expanded&sb=5>original thread</A>, but I've not yet tried in in PP97. The bad news is that there is no good reference for the Power Point Object model. The PP2K help files are the best you can do, but the PP97 help files are worthless. Steven Roman's book Writing Word Macros will help, because his overview of VBA is the same for PP and the material on shapes is also applicable to PowerPoint. Hope this helps! --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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