Replacing text with a text box in MS Word

Hi, I'm very new to Powershell scripting.  I want to find text and replace it with a text box object in MS Word.  However, I've been researching on where I can start but I've been unsuccessful finding material on how to use powershell scripting with MS Word (beyond the basics).  Any hints on this task would be great.  Also, any advice links of where I can find documentation on using PS with MS Word such as classes, methods available to use with Word.  Thanks!

September 3rd, 2015 3:39pm

Textboxes in Word are in VBA.  Post in the Work VBA developers forum to learn how to build and use a Word textbox.
Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 4:25pm

Just so that I understand, there's no way to do it in powershell?  Only VBA?

Thanks!

September 7th, 2015 2:06pm

You can build objects in PowerShell but there is no reason to do that. 

What is it the you need to do.  Explain that without saying how to do it.

If you just want to learn how to use PowerShell with word then searching will find h thousands of examples.

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 5:37pm

I want to be able to use Powershell scripting to replace a text with a text box object.  Here's a similar example, https://gallery.technet.microsoft.com/office/fa2473ba-6d53-49f2-a93e-ce6eadb53293, but instead of replacing with another word, it's replacing with a text box instead.  Thanks!
September 9th, 2015 11:04am

You have to create the textbox object and add it to the range where the word is.  In Excel a textbox is a "shape".

Search on Word VBA insert textbox to see how it is done: https://msdn.microsoft.com/en-us/library/office/ff821414.aspx?f=255&MSPPError=-2147217396

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 11:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics