Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Currently, I have a dashboard with several line, pivot, pie charts.
I've developed a vbscript macro to export all of these as images to powerpoint.
I'd like to add notes (and/or) comments to each powerpoint slide using the vbscript macro in order to describe each chart.
I've attached an image for clarification if needed.
Does anyone know how this can be done?
Thanks
yes it is posiible through macro
I'm sure it can be done. You'll have to find some code to add the notes. Here's a vba example. It shouldn't be too hard to adapt this to vbscript.
Thank you for you reply.
Can you offer any guidance regarding how to adapt to vbscript?
I haven't been able to get it correct yet.
Here is my script....
sub ppt
on error resume next
'vPPTTemplatePath = "C:\Template.pptx"
set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True
'Set PPPres = PPApp.Presentations.Open(vPPTTemplatePath, -1)
set PPPres = PPApp.Presentations.Add
PPSlideNo=1
'------------ Slide 1 -----------------------------
set PPSlide = PPPres.Slides.Add(PPSlideNo, 1)
ActiveDocument.Sheets("Pie").Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetSheetObject("CH01").CopyBitmapToClipboard
PPSlide.Shapes.Paste
set Shape1 = PPSlide.Shapes(1)
Shape1.LockAspectRatio = msoTrue
Shape1.NotesPage.Shapes.Placeholders[2].TextFrame.TextRange.InsertAfter("This is a test comment.")
With Shape1
.LockAspectRatio = msoTrue
'.Height = 500
'.Width = 800
.Left = 50
.Top = 0
.TextFrame.TextRange.Text = "Test Comment"
end with
Shape1.Left = (.SlideWidth \ 2) - (Shape1.Width \ 2)
Shape1.Top = (.SlideHeight \ 2) - (Shape1.Height \ 2)'100
' Shape1.Align mso
ActiveDocument.GetApplication.WaitForIdle
end sub