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 / September 2006

Tip: Looking for answers? Try searching our database.

fields in a powerpoint document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Philip Michell - 28 Sep 2006 16:51 GMT
I am trying to create a master document that I can populate with entries in
specific fields from either the document properties or an entry form (i.e. a
master document that I can then easily change the client name, date, project
name etc. throughout the document.
Any help gratefully received!
John Wilson - 28 Sep 2006 17:11 GMT
This vba would swap any instance of "xname" with the name you input when it
runs. It could easily be extended to swap "xtitle" etc.

Sub merger()
On Error GoTo errhandler
Dim xname As String
xname = InputBox("Name")
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.HasTextFrame And oshp.TextFrame.HasText Then
With oshp.TextFrame
If .TextRange = "xname" Then .TextRange = xname
End With
End If
Next
Next
Exit Sub
errhandler:
MsgBox ("Sorry there's been an error!")
End Sub
Signature


Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html

> I am trying to create a master document that I can populate with entries in
> specific fields from either the document properties or an entry form (i.e. a
> master document that I can then easily change the client name, date, project
> name etc. throughout the document.
> Any help gratefully received!
John Wilson - 28 Sep 2006 17:35 GMT
With a little more thought the previous code will only work if xname is the
sole content of the text frame!

This may work better
Sub merger()
On Error GoTo errhandler
Dim xname As String
Dim oTxtRng As TextRange
Dim oTmpRng As TextRange
xname = InputBox("Name")

   
Set osld = Application.ActivePresentation.Slides(1)
For Each oshp In osld.Shapes
Set oTxtRng = oshp.TextFrame.TextRange
Set oTmpRng = oTxtRng.Replace(FindWhat:="xname", _
Replacewhat:=xname, WholeWords:=True)
Do While Not oTmpRng Is Nothing
Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length, _
oTxtRng.Length)
Set oTmpRng = oTxtRng.Replace(FindWhat:="xname", _
Replacewhat:=xname, WholeWords:=True)
Loop
Next oshp

Exit Sub
errhandler:
MsgBox ("Sorry there's been an error!")
End Sub

Signature

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html

> This vba would swap any instance of "xname" with the name you input when it
> runs. It could easily be extended to swap "xtitle" etc.
[quoted text clipped - 24 lines]
> > name etc. throughout the document.
> > Any help gratefully received!
David M. Marcovitz - 28 Sep 2006 18:18 GMT
Perhaps PPT Merge can help:

http://www.rdpslides.com/pptools/merge/index.html

--David

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?UGhpbGlwIE1pY2hlbGw=?= <Philip
Michell@discussions.microsoft.com> wrote in
news:EBDBED9A-34CC-4D98-BF76-416AD266897C@microsoft.com:

> I am trying to create a master document that I can populate with
> entries in specific fields from either the document properties or an
> entry form (i.e. a master document that I can then easily change the
> client name, date, project name etc. throughout the document.
> Any help gratefully received!
 
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.