Problem with that PPT changes an objects number during macro in aloop

W

Wesslan

Hi,

I have an issue with a macro which creates automatic slides for me in
PPT. The data is taken from excel and then put in the corresponding
place (object) in PPT. However, after having looped exactly 42 times,
the object which is being pasted to (I have one file which is the
source file that is opened and manipulated with the data over and over
again and saved everytime depending on the analysed firms name)
changes number from 292 to 293, and if I click it again it changes to
294 etc... So for the first 42 times the object continues to be "group
292" but on the 43 rd time, it becomes "group 293", any suggestions as
to why this is and how to solve it?

The code used is:

Rectangle = "Group 292"
oPPTApp.ActiveWindow.Selection.SlideRange.Shapes(Rectangle).Select

Best regards,

Peder
 

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

Top