Add a picture in Word from VBA without it moving with the text added after it? - vba

I've added the picture to the word document and when I try to add text on lines below it on the document, the picture is moved by the text being printed behind it instead.
How can I add the picture so that it doesn't move to the right when additional text is added but at the same kept in line with the text getting printed above it?

Related

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

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.

Text jumbled in reading from multiple line highlights using PDF box API

We have used the above algorithm suggested in the link to read the highlighted text from PDF files. It works fine with single line highlights.
However, text read from multiple line highlights is incorrect. Final text read from highlight is completely jumbled with neighboring lines text.
Help us in resolving the above issue. - Thanks

Word VB Header Text Box Editing

I'm trying to edit the text in an object contained in the header of Word document but I can't figure out how to do it. I'm able to change the text of the header but not the text in the text box in the header. I'm looking at using a text box (or any object) that is specific to that page and isn't duplicated on every page. Can anyone point me in the right direction?

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.

How to get the selected text from webview?

If I holds the finger on a word displayed in web view,
highlight the word with corner anchors to allow
me to stretch the selection across a span of
words. Once a block of text is
highlighted, it gives me the option to copy text.
Can i get that highlighted text without coping it?
Thanks in advance
This one worked for me: Cocobuilder archive
In short, you need:
[[myWebView selectedDOMRange] toString];