Jump to content

Insert image into Word bookmark


Spiff59
 Share

Recommended Posts

I'm using an Autoit GUI with a combobox to select a persons name to put it at the bottom of a Word form in place of a bookmark. This works fine:

$Parm_Provider = "Joe Plumber"
$oWord.Activedocument.Bookmarks("BM_Provider_Name").Range.Text = $Parm_Provider

I've been asked to display a graphic representation of the persons actual signature above the printed name.

I've been playing with the .selection and .range methods and InLineShapes.AddPicture but can't seem to come up with a combination that works.

Does anyone know how to replace a Word bookmark with an image file?

Thanks.

Link to comment
Share on other sites

I was unable to find a method to use a bookmark as the location to insert an image into a form/document, but you can manually position the image with the following code:

$oWord.Activedocument.Shapes.AddPicture($img, False, True, $left, $top)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...