Capture Value of Excel OLE shape and store in Variable
Hey All,
I'm trying to grab the value of an embedded object (by Excel cell value link - paste special) and can't seem to find the correct procedure.
I have a dynamic Excel file (Cells auto update every 60 seconds) linked in my PPT file.
An action button triggers the following macro to write the value in a shape as text. The goal here is to calculate (sum) up some values, so I will be capturing several fields over different times.
Variable Score is Public at start of module.
Code:
Sub FM1()
Score = ActivePresentation.SlideShowWindow.View.Slide.Shapes("P11").OLEFormat.Object.Value
ActivePresentation.SlideShowWindow.View.Slide.Shapes("FMScore").TextFrame.TextRange.Text = Score
End Sub
I'm using Office 2010.
Any help would be greatly appreciated.
Thank you very much.