Excel to Powerpoint - Text Box Properties

  • Thread starter Thread starter AussieDave
  • Start date Start date
A

AussieDave

When copying a text box from Excel to Powerpoint, the source data
(Verdana 10pt) becomes Times New Roman 24pt in the destination! Any
ideas as to how this can be remedied within my macro?
Thanks in advance, Dave
 
Sub TextBox2PPT()

Dim PPApp As Object
Dim PPPres As Object
Dim PPSlide As Object
Dim myFontName As Variant
Dim myFontSize As Long

With Selection.Font
myFontName = .Name
myFontSize = .Size
End With

Set PPApp = GetObject(, "Powerpoint.Application")
Set PPPres = PPApp.ActivePresentation
PPApp.ActiveWindow.ViewType = 9
Set PPSlide = PPPres.Slides(PPApp.ActiveWindow.Selection. _
SlideRange.SlideIndex)

Selection.Copy

PPSlide.Shapes.Paste.Select

PPApp.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange. _
Font.Size = myFontSize
With PPApp.ActiveWindow.Selection.ShapeRange.TextFrame. _
TextRange.Font
.NameAscii = myFontName
.NameOther = myFontName
.NameFarEast = myFontName
End With

Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top