 |
|
 |
|
Next: Mcafee Startup
|
| Author |
Message |
External

Since: Sep 25, 2009 Posts: 1
|
(Msg. 1) Posted: Fri Sep 25, 2009 1:23 pm
Post subject: Macro to udpate and dislpay file path before save? Archived from groups: microsoft>public>powerpoint (more info?)
|
|
|
Hi,
I've very new to macros, and really need some help. Does anyone know how to
make this macro (from Microsoft's knowlegde base) run automatically before
the presentation is saved?
Sub UpdatePath()
' Macro to add the path and file name to each slide's footer.
Dim PathAndName As String
Dim FeedBack As Integer
' Place a message box warning prior to replacing footers.
FeedBack = MsgBox( _
"This Macro replaces any existing text that appears " & _
"within your current footers " & Chr(13) & _
"with the presentation name and its path. " & _
"Do you want to continue?", vbQuestion + vbYesNo, _
"Warning!")
' If no is selected in the dialog box, quit the macro.
If FeedBack = vbNo Then
End
End If
' Gets the path and file name and converts the string to lowercase.
PathAndName = LCase(ActivePresentation.Path & "\" & _
ActivePresentation.Name)
' Checks whether there is a Title Master, and if so, updates the
' path.
If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .Footer
.Text = PathAndName
End With
End With
End If
' Updates the slide master.
With ActivePresentation.SlideMaster.HeadersFooters
With .Footer
.Text = PathAndName
End With
End With
' Updates the individual slides that do not follow the master.
Dim X As Integer
For X = 1 To ActivePresentation.Slides.Count
With ActivePresentation.Slides(X).HeadersFooters
With .Footer
.Text = PathAndName
End With
End With
Next
End Sub
Any help would be greatly appreciated.
Nick >> Stay informed about: Macro to udpate and dislpay file path before save? |
|
| Back to top |
|
 |  |
External

Since: Nov 8, 2008 Posts: 108
|
(Msg. 2) Posted: Sat Sep 26, 2009 4:27 pm
Post subject: Re: Macro to udpate and dislpay file path before save? Archived from groups: per prev. post (more info?)
|
|
|
>
> I've very new to macros, and really need some help. Does anyone know how to
> make this macro (from Microsoft's knowlegde base) run automatically before
> the presentation is saved?
What version of PPT are you using? PPT 2003 (and possibly earlier) support a
PresentationBeforeSave event that you can respond to using an add-in. You'd
trap the event and in the event code, call the UpdatePath subroutine.
There's more info about event handling here:
Make your VBA code in PowerPoint respond to events
[URL="http://www.pptfaq.com/FAQ00004.htm"]http://www.pptfaq.com/FAQ00004.htm[/URL]
>
> Sub UpdatePath()
>
> ' Macro to add the path and file name to each slide's footer.
> Dim PathAndName As String
> Dim FeedBack As Integer
>
> ' Place a message box warning prior to replacing footers.
> FeedBack = MsgBox( _
> "This Macro replaces any existing text that appears " & _
> "within your current footers " & Chr(13) & _
> "with the presentation name and its path. " & _
> "Do you want to continue?", vbQuestion + vbYesNo, _
> "Warning!")
>
> ' If no is selected in the dialog box, quit the macro.
> If FeedBack = vbNo Then
> End
> End If
>
> ' Gets the path and file name and converts the string to lowercase.
> PathAndName = LCase(ActivePresentation.Path & "\" & _
> ActivePresentation.Name)
>
> ' Checks whether there is a Title Master, and if so, updates the
> ' path.
> If ActivePresentation.HasTitleMaster Then
> With ActivePresentation.TitleMaster.HeadersFooters
> With .Footer
> .Text = PathAndName
> End With
> End With
> End If
>
> ' Updates the slide master.
> With ActivePresentation.SlideMaster.HeadersFooters
> With .Footer
> .Text = PathAndName
> End With
> End With
>
> ' Updates the individual slides that do not follow the master.
> Dim X As Integer
> For X = 1 To ActivePresentation.Slides.Count
> With ActivePresentation.Slides(X).HeadersFooters
> With .Footer
> .Text = PathAndName
> End With
> End With
> Next
>
> End Sub
>
> Any help would be greatly appreciated.
>
> Nick
==============================
PPT Frequently Asked Questions
[URL="http://www.pptfaq.com/"]http://www.pptfaq.com/[/URL]
PPTools add-ins for PowerPoint
[URL="http://www.pptools.com/"]http://www.pptools.com/[/URL]
Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14 >> Stay informed about: Macro to udpate and dislpay file path before save? |
|
| Back to top |
|
 |  |
External

Since: Sep 26, 2009 Posts: 2
|
(Msg. 3) Posted: Sat Sep 26, 2009 4:28 pm
Post subject: Re: Macro to udpate and dislpay file path before save? Archived from groups: per prev. post (more info?)
|
|
|
Thanks Steve, it is 2003 so I'll check that out and let you know. I
appreciate your help.
Nick
"Steve Rindsberg" wrote:
>
> >
> > I've very new to macros, and really need some help. Does anyone know how to
> > make this macro (from Microsoft's knowlegde base) run automatically before
> > the presentation is saved?
>
> What version of PPT are you using? PPT 2003 (and possibly earlier) support a
> PresentationBeforeSave event that you can respond to using an add-in. You'd
> trap the event and in the event code, call the UpdatePath subroutine.
>
> There's more info about event handling here:
>
> Make your VBA code in PowerPoint respond to events
> [URL="http://www.pptfaq.com/FAQ00004.htm"]http://www.pptfaq.com/FAQ00004.htm[/URL]
>
> >
> > Sub UpdatePath()
> >
> > ' Macro to add the path and file name to each slide's footer.
> > Dim PathAndName As String
> > Dim FeedBack As Integer
> >
> > ' Place a message box warning prior to replacing footers.
> > FeedBack = MsgBox( _
> > "This Macro replaces any existing text that appears " & _
> > "within your current footers " & Chr(13) & _
> > "with the presentation name and its path. " & _
> > "Do you want to continue?", vbQuestion + vbYesNo, _
> > "Warning!")
> >
> > ' If no is selected in the dialog box, quit the macro.
> > If FeedBack = vbNo Then
> > End
> > End If
> >
> > ' Gets the path and file name and converts the string to lowercase.
> > PathAndName = LCase(ActivePresentation.Path & "\" & _
> > ActivePresentation.Name)
> >
> > ' Checks whether there is a Title Master, and if so, updates the
> > ' path.
> > If ActivePresentation.HasTitleMaster Then
> > With ActivePresentation.TitleMaster.HeadersFooters
> > With .Footer
> > .Text = PathAndName
> > End With
> > End With
> > End If
> >
> > ' Updates the slide master.
> > With ActivePresentation.SlideMaster.HeadersFooters
> > With .Footer
> > .Text = PathAndName
> > End With
> > End With
> >
> > ' Updates the individual slides that do not follow the master.
> > Dim X As Integer
> > For X = 1 To ActivePresentation.Slides.Count
> > With ActivePresentation.Slides(X).HeadersFooters
> > With .Footer
> > .Text = PathAndName
> > End With
> > End With
> > Next
> >
> > End Sub
> >
> > Any help would be greatly appreciated.
> >
> > Nick
>
>
> ==============================
> PPT Frequently Asked Questions
> [URL="http://www.pptfaq.com/"]http://www.pptfaq.com/[/URL]
>
> PPTools add-ins for PowerPoint
> [URL="http://www.pptools.com/"]http://www.pptools.com/[/URL]
>
> Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14
>
> >> Stay informed about: Macro to udpate and dislpay file path before save? |
|
| Back to top |
|
 |  |
External

Since: Sep 26, 2009 Posts: 2
|
(Msg. 4) Posted: Mon Sep 28, 2009 7:25 am
Post subject: Re: Macro to udpate and dislpay file path before save? Archived from groups: per prev. post (more info?)
|
|
|
Hi, I tried following the link but I just don't know enough to be able to
understand it at all, kind of made my head go fuzzy...
I'm guessing it's not going to be simple?
Nick
"Nick Rumbelow" wrote:
> Thanks Steve, it is 2003 so I'll check that out and let you know. I
> appreciate your help.
>
> Nick
>
>
> "Steve Rindsberg" wrote:
>
> >
> > >
> > > I've very new to macros, and really need some help. Does anyone know how to
> > > make this macro (from Microsoft's knowlegde base) run automatically before
> > > the presentation is saved?
> >
> > What version of PPT are you using? PPT 2003 (and possibly earlier) support a
> > PresentationBeforeSave event that you can respond to using an add-in. You'd
> > trap the event and in the event code, call the UpdatePath subroutine.
> >
> > There's more info about event handling here:
> >
> > Make your VBA code in PowerPoint respond to events
> > [URL="http://www.pptfaq.com/FAQ00004.htm"]http://www.pptfaq.com/FAQ00004.htm[/URL]
> >
> > >
> > > Sub UpdatePath()
> > >
> > > ' Macro to add the path and file name to each slide's footer.
> > > Dim PathAndName As String
> > > Dim FeedBack As Integer
> > >
> > > ' Place a message box warning prior to replacing footers.
> > > FeedBack = MsgBox( _
> > > "This Macro replaces any existing text that appears " & _
> > > "within your current footers " & Chr(13) & _
> > > "with the presentation name and its path. " & _
> > > "Do you want to continue?", vbQuestion + vbYesNo, _
> > > "Warning!")
> > >
> > > ' If no is selected in the dialog box, quit the macro.
> > > If FeedBack = vbNo Then
> > > End
> > > End If
> > >
> > > ' Gets the path and file name and converts the string to lowercase.
> > > PathAndName = LCase(ActivePresentation.Path & "\" & _
> > > ActivePresentation.Name)
> > >
> > > ' Checks whether there is a Title Master, and if so, updates the
> > > ' path.
> > > If ActivePresentation.HasTitleMaster Then
> > > With ActivePresentation.TitleMaster.HeadersFooters
> > > With .Footer
> > > .Text = PathAndName
> > > End With
> > > End With
> > > End If
> > >
> > > ' Updates the slide master.
> > > With ActivePresentation.SlideMaster.HeadersFooters
> > > With .Footer
> > > .Text = PathAndName
> > > End With
> > > End With
> > >
> > > ' Updates the individual slides that do not follow the master.
> > > Dim X As Integer
> > > For X = 1 To ActivePresentation.Slides.Count
> > > With ActivePresentation.Slides(X).HeadersFooters
> > > With .Footer
> > > .Text = PathAndName
> > > End With
> > > End With
> > > Next
> > >
> > > End Sub
> > >
> > > Any help would be greatly appreciated.
> > >
> > > Nick
> >
> >
> > ==============================
> > PPT Frequently Asked Questions
> > [URL="http://www.pptfaq.com/"]http://www.pptfaq.com/[/URL]
> >
> > PPTools add-ins for PowerPoint
> > [URL="http://www.pptools.com/"]http://www.pptools.com/[/URL]
> >
> > Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14
> >
> > >> Stay informed about: Macro to udpate and dislpay file path before save? |
|
| Back to top |
|
 |  |
External

Since: Nov 8, 2008 Posts: 108
|
(Msg. 5) Posted: Mon Sep 28, 2009 2:26 pm
Post subject: Re: Macro to udpate and dislpay file path before save? Archived from groups: per prev. post (more info?)
|
|
|
In article , Nick Rumbelow
wrote:
> Hi, I tried following the link but I just don't know enough to be able to
> understand it at all, kind of made my head go fuzzy...
>
> I'm guessing it's not going to be simple?
It's not insanely complex either ... though it certainly seems that way when you
haven't done much of this stuff before.
Give it a try, post your code back here if you run into trouble.
>
> Nick
>
> "Nick Rumbelow" wrote:
>
> > Thanks Steve, it is 2003 so I'll check that out and let you know. I
> > appreciate your help.
> >
> > Nick
> >
> >
> > "Steve Rindsberg" wrote:
> >
> > >
> > > >
> > > > I've very new to macros, and really need some help. Does anyone know how to
> > > > make this macro (from Microsoft's knowlegde base) run automatically before
> > > > the presentation is saved?
> > >
> > > What version of PPT are you using? PPT 2003 (and possibly earlier) support a
> > > PresentationBeforeSave event that you can respond to using an add-in. You'd
> > > trap the event and in the event code, call the UpdatePath subroutine.
> > >
> > > There's more info about event handling here:
> > >
> > > Make your VBA code in PowerPoint respond to events
> > > [URL="http://www.pptfaq.com/FAQ00004.htm"]http://www.pptfaq.com/FAQ00004.htm[/URL]
> > >
> > > >
> > > > Sub UpdatePath()
> > > >
> > > > ' Macro to add the path and file name to each slide's footer.
> > > > Dim PathAndName As String
> > > > Dim FeedBack As Integer
> > > >
> > > > ' Place a message box warning prior to replacing footers.
> > > > FeedBack = MsgBox( _
> > > > "This Macro replaces any existing text that appears " & _
> > > > "within your current footers " & Chr(13) & _
> > > > "with the presentation name and its path. " & _
> > > > "Do you want to continue?", vbQuestion + vbYesNo, _
> > > > "Warning!")
> > > >
> > > > ' If no is selected in the dialog box, quit the macro.
> > > > If FeedBack = vbNo Then
> > > > End
> > > > End If
> > > >
> > > > ' Gets the path and file name and converts the string to lowercase.
> > > > PathAndName = LCase(ActivePresentation.Path & "\" & _
> > > > ActivePresentation.Name)
> > > >
> > > > ' Checks whether there is a Title Master, and if so, updates the
> > > > ' path.
> > > > If ActivePresentation.HasTitleMaster Then
> > > > With ActivePresentation.TitleMaster.HeadersFooters
> > > > With .Footer
> > > > .Text = PathAndName
> > > > End With
> > > > End With
> > > > End If
> > > >
> > > > ' Updates the slide master.
> > > > With ActivePresentation.SlideMaster.HeadersFooters
> > > > With .Footer
> > > > .Text = PathAndName
> > > > End With
> > > > End With
> > > >
> > > > ' Updates the individual slides that do not follow the master.
> > > > Dim X As Integer
> > > > For X = 1 To ActivePresentation.Slides.Count
> > > > With ActivePresentation.Slides(X).HeadersFooters
> > > > With .Footer
> > > > .Text = PathAndName
> > > > End With
> > > > End With
> > > > Next
> > > >
> > > > End Sub
> > > >
> > > > Any help would be greatly appreciated.
> > > >
> > > > Nick
> > >
> > >
> > > ==============================
> > > PPT Frequently Asked Questions
> > > [URL="http://www.pptfaq.com/"]http://www.pptfaq.com/[/URL]
> > >
> > > PPTools add-ins for PowerPoint
> > > [URL="http://www.pptools.com/"]http://www.pptools.com/[/URL]
> > >
> > > Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14
> > >
> > >
==============================
PPT Frequently Asked Questions
[URL="http://www.pptfaq.com/"]http://www.pptfaq.com/[/URL]
PPTools add-ins for PowerPoint
[URL="http://www.pptools.com/"]http://www.pptools.com/[/URL]
Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14 >> Stay informed about: Macro to udpate and dislpay file path before save? |
|
| Back to top |
|
 |  |
| Related Topics: | Macro - Is Macro in power point is same as in Excel
Text Addition/Removal Macro - Wow, you guys are smart so I'm sure this question will be a piece of cake. I'm trying to write a ppt macro (Windows, Powerpoint 2003) to automatically step through all pages of the document, examine all text fields (titles, text boxes, all bullets in...
Can I save in Powerpoint handouts in Grayscale? - I know we can PRINT them, but is there a way to SAVE them in Grayscale? Also, I have the PDF save add-in, but can't get that to create a grayscale pdf that I can save either.
A macro to call up the SpeakerNotes master in PP - I need a simple PowerPoint macro that will call up the SpeakerNotes master and format the text to bold 16 point. Ken Chant
Power point 2007 macro to move an object - I am trying to work with power point. I have a meter (simple, with a needle in the middle to move left or right). Then, I have a selector with 8 prime function. Each function have 3 sub-functions. Example: Function: Weather. Sub Function: good, bad,... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|