I have this code snippet which works fine, except for the last line when I try to align the text to the center. msoAlignRight was just for testing purposes to see if it moves to the right..but nothing happens. - edit: I have incorporated this from Qlikview to PPT macro, shouldn't matter though.
NOTE: I WOULD LIKE leText 0 to be centered text in the middle. Now it's to the left.
Sub ppt
'Set ppt template
filePath_template = "...\Template.pptx"
'Remove filters
ActiveDocument.ClearAll()
'Retrieve all accounts
set field1Values = ActiveDocument.Fields("name").GetPossibleValues
ActiveDocument.ActivateSheetByID "ABC01"
for i = 0 to 15
ActiveDocument.Fields("name").Clear
ActiveDocument.GetApplication.WaitForIdle 100
'Set filter on just 1 account
ActiveDocument.Fields("name").Select field1Values.Item(i).Text
ActiveDocument.GetApplication.Sleep 5000
ActiveDocument.GetApplication.WaitForIdle 100
'Create a ppt object
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
'Open the ppt template
Set objPresentation = objPPT.Presentations.Open(filePath_template)
Set PPSlide = objPresentation.Slides(1)
'leText 2
ActiveDocument.GetSheetObject("TEXT001").CopyTextToClipboard
ActiveDocument.GetApplication.WaitForIdle 100
Set leText2 = PPSlide.Shapes.Paste
leText2.Top = 280
leText2.Left = 310
leText2.Width = 300
leText2.TextFrame.TextRange.Font.Size = 8
ActiveDocument.GetApplication.Sleep 1000
for k = 0 to 10
ActiveDocument.GetApplication.WaitForIdle 100
ActiveDocument.ActiveSheet.CopyBitmapToClipboard
ActiveDocument.GetApplication.WaitForIdle 100
next
ActiveDocument.GetApplication.WaitForIdle 100
'leText 0
ActiveDocument.GetSheetObject("TEXT002").CopyTextToClipboard
ActiveDocument.GetApplication.WaitForIdle 100
Set leText0 = PPSlide.Shapes.Paste
leText0.Top = 1
leText0.Left = 150
leText0.Width = 700
leText0.TextFrame.TextRange.Font.Size = 12
leText0.TextFrame.TextRange.Font.Color = vbWhite
'Save ppt
filePath = "...\SaveFolder\" & field1Values.Item(i).Text & ".pptx"
objPresentation.SaveAs filePath
Next
objPPT.Quit
End Sub