Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2013, 07:02 AM
bremen22 bremen22 is offline Add Month Name to Title via macro Windows 7 64bit Add Month Name to Title via macro Office 2007
Advanced Beginner
Add Month Name to Title via macro
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Question Add Month Name to Title via macro

Good Morning,



I am working on a project that automatically generates reports in PowerPoint. Essentially I have an excel spread sheet that queries a database, pulls in the data, opens a PowerPoint template, builds tables in Powerpoint based upon the data in the sheets, and then saves out the Powerpoint presentation as a new file.

Each slide in the template has some various header information. One item of information that it must contain is the Month and Year the data was generated.

Is there some way possible to, in the header block, have the name of previous month apear automatically based on the system date?
Reply With Quote
  #2  
Old 08-27-2013, 07:06 AM
amw amw is offline Add Month Name to Title via macro Windows 7 64bit Add Month Name to Title via macro Office 2010 32bit
Novice
 
Join Date: Aug 2013
Posts: 6
amw is on a distinguished road
Exclamation

Quote:
Originally Posted by bremen22 View Post
Good Morning,

I am working on a project that automatically generates reports in PowerPoint. Essentially I have an excel spread sheet that queries a database, pulls in the data, opens a PowerPoint template, builds tables in Powerpoint based upon the data in the sheets, and then saves out the Powerpoint presentation as a new file.

Each slide in the template has some various header information. One item of information that it must contain is the Month and Year the data was generated.

Is there some way possible to, in the header block, have the name of previous month appear automatically based on the system date?


use control panel for this situation .
No you cannot have previous slides
Reply With Quote
  #3  
Old 08-27-2013, 09:57 AM
JohnWilson JohnWilson is offline Add Month Name to Title via macro Windows 7 64bit Add Month Name to Title via macro Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Is the header on the slide master?

Assuming you have a textbox on the Master with some text this macro should insert the Month and Year before the text.

Sub AddDate()
With ActivePresentation.Designs(1).SlideMaster.Shapes(" Header").TextFrame.TextRange
.Text = Mid(.Text, InStrRev(.Text, ":") + 1)
.InsertBefore (MonthName(Month(Now)) & "_") & Year(Now) & ":"
End With
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #4  
Old 08-27-2013, 11:45 AM
bremen22 bremen22 is offline Add Month Name to Title via macro Windows 7 64bit Add Month Name to Title via macro Office 2007
Advanced Beginner
Add Month Name to Title via macro
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Default

Thanks. I will give that a try as soon as I can and I will let you know how it came out.
Reply With Quote
  #5  
Old 08-29-2013, 05:26 AM
amw amw is offline Add Month Name to Title via macro Windows 7 64bit Add Month Name to Title via macro Office 2010 32bit
Novice
 
Join Date: Aug 2013
Posts: 6
amw is on a distinguished road
Default Re: Thank you

Your Welcome if anything does not work out please contact your computer service number.
Reply With Quote
  #6  
Old 08-29-2013, 05:28 AM
amw amw is offline Add Month Name to Title via macro Windows 7 64bit Add Month Name to Title via macro Office 2010 32bit
Novice
 
Join Date: Aug 2013
Posts: 6
amw is on a distinguished road
Default

Quote:
Originally Posted by JohnWilson View Post
Is the header on the slide master?

Assuming you have a textbox on the Master with some text this macro should insert the Month and Year before the text.

Sub AddDate()
With ActivePresentation.Designs(1).SlideMaster.Shapes(" Header").TextFrame.TextRange
.Text = Mid(.Text, InStrRev(.Text, ":") + 1)
.InsertBefore (MonthName(Month(Now)) & "_") & Year(Now) & ":"
End With
End Sub



YES MICROSOFT should have a year and date and time .
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Month Name to Title via macro How to set month+1 and horizontal line nightkn8 Word 12 03-25-2013 02:06 PM
How to show just day and month ketanco Project 2 06-14-2012 03:25 PM
Re: a month-old post with no replies. BudVitoff Outlook 0 10-10-2011 10:22 PM
Add Month Name to Title via macro Day and Month to Uppercase Andy2011 Word VBA 1 07-22-2011 04:34 PM
Add Month Name to Title via macro Formulate month in Excel 2010 meninio Excel 4 01-25-2011 12:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft