Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
My macro code is not working properly. while I'm exporting to ppt it is going to Edit module page. Why?
Thanks,
Krishna
Hi,
Try using this code.
Sub ExportPPT
ActiveDocument.ActiveSheet.FitZoomToWindow
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
For i = 0 To ActiveDocument.NoOfSheets - 1
' Set MySheet = ActiveDocument.GetSheet(i)
Set PPSlide = objPresentation.Slides.Add(1,11)
' ActiveDocument.ActiveSheet.CopyBitmapToClipboard
ActiveDocument.GetSheetObject("CH03").CopyBitmapToClipboard
PPSlide.Shapes.Paste
ActiveDocument.GetSheetObject("CH04").CopyBitmapToClipboard
PPSlide.Shapes.Paste
Next
Set PPSlide = Nothing
Set PPPres = Nothing
End sub