VBA Powerpoint - find HIGHLIGHTED text in shape, then ADD a new text box with ANIMATION effect - vba

I have this Powerpoint file. Here the link:
https://drive.google.com/open?id=1JaRrBDOEKkCnxeGHrynwdmhPtaOZ8Y4f
I have turned a MS Word file into Powerpoint file using the instruction in this video:
https://www.youtube.com/watch?v=7oao6EzF08U
after conversion
I want to unhighlight the text, then add a new text box (Red shape fill and Send behind text) with ANIMATION effect, put it in the position of the unhighlighted text like in the pictures.
unhighlight text
add new text box with animation effect
Therefore, I can show the correct answer to my students when teaching using PPT.
I have about 100 slides like this but I don't have enough time to do it all manually.
Unfortunately, MS Powerpoint doesn't have Macro Recorder like in MS Word and I also don't know much about VBA code.
Is there any way to use VBA code to solve this problem?
Thanks in advance.

Related

VBA Macro in Word to Select and Group Image with Highlight Boxes (shapes) on top of it

Is it possible to use VBA after selecting an image in Word to automatically group the image with any shapes that are on top of it? I am creating a "How To" document for using an app. I am capturing screenshots, pasting them into Word, then adding rectangle shapes on top of the screenshots. I'd like to be able to select an image and run a macro to automatically group the image with the shapes on top of it. I am already using a macro to change the text wrap type of the image and send the image to back (behind the shapes). I'd like to add code to then group it with shapes above it... is this possible? Thanks for any tips!

PoiwerPoint auto-updating text boxes

I want to know if there is a way to link text boxes in PowerPoint in a similar fashion as Excel so that when I update one text box (for instance, changing the title of the presentation), the other linked text boxes will update by themselves. The purpose is to avoid having to go through the whole presentation to change manually every relevant slides. I don't think there is a build in function but I am fairly new to VBA in PowerPoint (have some experience with Excel already). Any input is very much appreciated, thank you!

A Text value change on Powerpoint by using OpenXml doesn't fit

I use OpenXml for creating custom powerpoint presentation in this way: I put a keyword on the presentation, I found it during process with OpenXml and change the text value. Everything work fine but the fit option doesn't work at first.
The text box has options "Autofit: Shrink text on overflow; Wrap text in shape: On"
After my process, the new text appear on the right place but the autofit is not done, I need to click on the text box and make a input for see the autofit work. I think that PowerPoint only check option after a modification.
What I want is the autofit option is called at the end of the process. Can anyone help me?
I hope you understand what I want to do.
Thanks.
It's not possible using just OpenXML. The <a:normAutofit/> tag is used by a client application, such as PowerPoint, to render the text larger or smaller, as needed. OpenXML doesn't actually render anything, so until the client does, it will just read the text as if it is not auto-fitted.
There are a few options to think of to control this - none of them great however. One would be to use VSTO or VBA in PowerPoint to check all shapes on PPTX open and if they have a AutoFit tag, to re-render them. A second way would be to do all the font measurements yourself based on the shape's width & height and then set the font scale to the appropriate percentage. Another would be to make a textbox large enough to fit the largest amount of text you will ever insert and then turn autofit off.
Sorry this doesn't really help you immediately. I've done tons of research on this particular subject and it's all bad news.

save textbox as picture in powerpoint_transparancy difficulties

In powerpoint 2010 I want to save an inserted textbox as a picture, which is simply done by right-clicking on the text box and save it. The saved image will however include a large amount of transparancy around the text. I am wondering whether this abundance of transparency around the text can be reduced, whithout using photo-editing programs.
I understand that powerpoint is not the right tool to use the beautifuly created texts for other purposes aside from office itself, however this would make things ten times easier for some coworkers of mine.
I hope someone can help me with this, also if it means using VBA or other (complex) codes/languages.
Thnx for your time.
Mike
Once you have typed your text in the textbox,
Copy the text box, right-click and paste as image
Now you have the image of the text box as you will get while saving that textbox as image - - using the save_as_image option
Select this image and click on format tab
You have an option to crop your image
Crop the image and save it as a picture

How to copy picture from Word to Powerpoint programmatically?

I am creating a macro that converts a Word 2007 document into a structured PowerPoint 2007 presentation. I am looping over all the paragraphs of the document and copying them over to the new presentation.
I am able to copy and paste the paragraphs to the presentation just fine. But I also need to be able to copy and paste the pictures from the Word document into the PowerPoint (and in the right location between paragraphs).
So far, I am able to detect if a paragraph is a picture by looking at the paragraph's style attribute - it will say "Figure". But, I don't know what to do from there. After looking online, it looks like I should be able to do this:
paragraphFromDocument.Range.Copy
currentSlide.Shapes.Paste
But, this doesn't seem to work. How do I copy a picture from Word to PowerPoint?
Thanks
EDIT
I've also tried:
paragraphFromDocument.Range.CopyAsPicture
currentSlide.Shapes.PasteSpecial(ppPasteMetafilePicture)
and get this error message:
Shapes.PasteSpecial : Invalid Request. Clipboard is empty or contains data which may not be posted here.
But, when I use that CopyAsPicture command, I am able to open up PowerPoint (with the picture still on the clipboard from the macro) and use the Paste Special command to paste the picture to the slide.
paragraphFromDocument.Range.Copy
currentSlide.Shapes.Paste
actually did end up working, but I had to remove all special characters from the range first. That is why it was giving me the error message.