Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / November 2007

Tip: Looking for answers? Try searching our database.

How do I add the current path and file name to every slide?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carter Devereaux - 10 Oct 2004 03:05 GMT
I am not a programmer, but a novice interested in how I can add the
presentation's current path and file name to every slide. Does anyone know
how I can do that?

--Carter
Bill Foley - 10 Oct 2004 03:10 GMT
There is code on this page to do just what you want:

http://www.rdpslides.com/pptfaq/FAQ00407.htm

Signature

Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
"Success, something you measure when you are through succeeding."

>I am not a programmer, but a novice interested in how I can add the
> presentation's current path and file name to every slide. Does anyone know
> how I can do that?
>
> --Carter
Suzanne - 28 Nov 2007 13:29 GMT
Hi,

Thanks to this very old post I found from Bill Foley I have set up a VBA to
add the file name to ppt (used second option).  The VBA worked well, except I
can't change the font.  I have tried changing the font size and even tried a
different type of text:

With .TextFrame.TextRange.Font
                   .NameAscii = "Arial"
                   .Size = 18

Any idea's how to set the formating to a smaller font?

Also, is it possible to set the VBA code to include file name on all pages
excluding the title page?

I'm completely new to VBA's, so unfortunately don't have a clue...any help
would be greatly appreciated.

Many thanks,
Sue

> There is code on this page to do just what you want:
>
[quoted text clipped - 5 lines]
> >
> > --Carter
Michael Koerner - 28 Nov 2007 13:53 GMT
Here is a place that will tell you how to do it. http://office.microsoft.com/en-us/powerpoint/HA101077161033.aspx

Signature

 Michael Koerner
MS MVP - PowerPoint

 Hi,

 Thanks to this very old post I found from Bill Foley I have set up a VBA to
 add the file name to ppt (used second option).  The VBA worked well, except I
 can't change the font.  I have tried changing the font size and even tried a
 different type of text:

  With .TextFrame.TextRange.Font
                     .NameAscii = "Arial"
                     .Size = 18

 Any idea's how to set the formating to a smaller font?

 Also, is it possible to set the VBA code to include file name on all pages
 excluding the title page?

 I'm completely new to VBA's, so unfortunately don't have a clue...any help
 would be greatly appreciated.

 Many thanks,
 Sue

 "Bill Foley" wrote:

 > There is code on this page to do just what you want:
 >
 > http://www.rdpslides.com/pptfaq/FAQ00407.htm
 >
 > --
 > Bill Foley, Microsoft MVP (PowerPoint)
 > Microsoft Office Specialist Master Instructor
 > www.pttinc.com
 > Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
 > "Success, something you measure when you are through succeeding."
 >
 > "Carter Devereaux" <CarterDevereaux@discussions.microsoft.com> wrote in
 > message news:D2E19D6C-5F28-4C89-9AAC-3D87D60DDD68@microsoft.com...
 > >I am not a programmer, but a novice interested in how I can add the
 > > presentation's current path and file name to every slide. Does anyone know
 > > how I can do that?
 > >
 > > --Carter
 >
 >
 >
Steve Rindsberg - 28 Nov 2007 19:12 GMT
> Hi,
>
[quoted text clipped - 8 lines]
>
> Any idea's how to set the formating to a smaller font?

The .Size = 18 line sets the text size to 18 points.  Try

.Size = 12

or whatever point size you like.

Try

.NameAscii = "WhateverFontNameYouWant"
.Name = "WhateverFontNameYouWant"


> Also, is it possible to set the VBA code to include file name on all pages
> excluding the title page?

Which specific code are you using?

> I'm completely new to VBA's, so unfortunately don't have a clue...any help
> would be greatly appreciated.
[quoted text clipped - 11 lines]
> > >
> > > --Carter

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Suzanne - 29 Nov 2007 01:04 GMT
Thanks for your help, I thought it should be as simple as changing the size
but I'm still struggling.  I have tried using the two lines you suggested but
got no further.  

The code I am using is:

Sub AddTextBoxDateFilename()
' Adds a text box with date and filename to each slide
' You must first save the presentation at least once before using this

   Dim oSl As Slide
   Dim oSh As Shape

   On Error GoTo ErrorHandler

   For Each oSl In ActivePresentation.Slides
       ' do we already have a filename/date text box?  If do, use it:
       On Error Resume Next
       Set oSh = oSl.Shapes("FilenameAndDate")
       On Error GoTo ErrorHandler

       If oSh Is Nothing Then  ' no text box there already, create one

           ' change the position and formatting to suit your needs:
           Set oSh = oSl.Shapes.AddTextbox(msoTextOrientationHorizontal, 0,
510, 720, 28.875)

           With oSh

               .Name = "FilenameAndDate"

               .TextFrame.WordWrap = msoFalse
               With .TextFrame.TextRange.ParagraphFormat
                   .LineRuleWithin = msoTrue
                   .SpaceWithin = 1
                   .LineRuleBefore = msoTrue
                   .SpaceBefore = 0.5
                   .LineRuleAfter = msoTrue
                   .SpaceAfter = 0
               End With

               With .TextFrame.TextRange.Font
                   .NameAscii = "Arial"
                   .Size = 8
                   .Bold = msoFalse
                   .Italic = msoFalse
                   .Underline = msoFalse
                   .Shadow = msoFalse
                   .Emboss = msoFalse
                   .BaselineOffset = 0
                   .AutoRotateNumbers = msoFalse
                   .Color.SchemeColor = ppForeground
               End With
           End With    ' shape

       End If  ' osh is nothing

       ' now we know there's a shape by the correct name so
       Set oSh = oSl.Shapes("FilenameAndDate")
       With oSh.TextFrame.TextRange
           .Text = ActivePresentation.FullName & vbTab & Format(Now, "mmmm
dd, yyyy")
       End With

       Set oSh = Nothing

   Next    ' slide

NormalExit:
   Exit Sub

ErrorHandler:
   MsgBox ("There was a problem:" _
       & vbCrLf _
       & Err.Description)
   Resume NormalExit

End Sub

> > Hi,
> >
[quoted text clipped - 47 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 29 Nov 2007 05:40 GMT
Okeydoke ... so what does or doesn't happen when you run the code?
Do you get any error messages?

> Thanks for your help, I thought it should be as simple as changing the size
> but I'm still struggling.  I have tried using the two lines you suggested but
[quoted text clipped - 126 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Suzanne - 29 Nov 2007 06:46 GMT
no error messages, just very large font.

wohoo, it's working! I've been focussing on the code, when all I needed to
do was change the font size on the ppt before setting / running the
macro...crazy stuff.

Thanks!!!

> Okeydoke ... so what does or doesn't happen when you run the code?
> Do you get any error messages?
[quoted text clipped - 135 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 29 Nov 2007 16:56 GMT
> no error messages, just very large font.
>
> wohoo, it's working! I've been focussing on the code, when all I needed to
> do was change the font size on the ppt before setting / running the
> macro...crazy stuff.

Ah, gotcha.  I think I see what's going on.  See, if you've already run the macro, it
created the text box and formatted it.  The next time you run it and every time after
that, it looks for the text box and just changes the text, doesn't alter the formatting.

We could probably rig it so it always deletes and re-creates the text if that'd work out
better for you.

> Thanks!!!
>
[quoted text clipped - 137 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Sonia - 10 Oct 2004 03:17 GMT
Go to View > Master > Slide Master.  You may see three small placeholders at the
bottom.  If not, go to Format > Master Layout and check Footer.  Now you can
enter the file path in place of <footer> in the placeholder.  You may want to
delete the Date and Slide Number placeholders to provide more room.  Now return
to View > Normal.

The above will cause the path to show at the bottom of all slides.  If you don't
see the path, go to View > Header and Footer and be sure that Footer is checked.
Click "Apply to All".
Signature


Sonia Coleman
Microsoft PowerPoint MVP Team
Autorun Software, Templates and Tutorials

> I am not a programmer, but a novice interested in how I can add the
> presentation's current path and file name to every slide. Does anyone know
> how I can do that?
>
> --Carter

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.