iappyx / Instrumenta

Free and open source consulting-style Powerpoint toolbar
MIT License
272 stars 20 forks source link

Harvey balls are created on the first slide #2

Closed Marmootje closed 3 years ago

Marmootje commented 3 years ago

The harvey balls function inserts the shapes on the first slide of the presentation instead of the active slide.

The bug is caused by the two lines of code below:

Set HarveyCircle = ActivePresentation.Slides(1).Shapes.AddShape(msoShapeOval, 100, 100, 50, 50)
Set HarveyFill = ActivePresentation.Slides(1).Shapes.AddShape(msoShapePie, 101, 101, 48, 48)

Would be amazing if you could take a look at this. Thanks for making this nice add-in!

iappyx commented 3 years ago

Thanks! Should be fixed now. Need to brush up my VBA skills again a little bit. If any other suggestions for features please let me know.

Marmootje commented 3 years ago

Amazing! Works like a charm. Many thanks for your great work!!

In case you have time, I just noticed that when using the "E-mail selected slides" function, the chosen file name does not sort the slide numbers. Would be great to present this in a sorted way.

What would be even better in my opinion is to have a InputBox prompt the file name you would like to choose. The default attribute of this box could be the filename which is currently generated. This would give some flexibility to the user (since it's not so straightforward to change the name of file attachments in Outlook).

I'm not sure about the code for the sorting, but I think you could do the inputbox by adding a line like this: PresentationFilename = InputBox("Attachment file name:", "Send as e-mail", PresentationFilename)

iappyx commented 3 years ago

Good suggestion. I've updated it with your code suggestion so it will ask for the filename. The sort of slide numbers will take a bit longer. Now it's based on the order you've selected the slides. Will look into it.

Marmootje commented 3 years ago

Thanks! With this addition, I don't think the order of the slides is a big deal. Probably not worth spending time on.