Jump to content

Move selection in a Word table


polps
 Share

Recommended Posts

Hello all,

I have some trouble with the following code.

I want open a Word document, search for a string (I find the string in a table) and move in the right cell.

The last command $objSelection.MoveRight ("Unit:=wdCell") doesn't work at all, probably due to wrong sintax.

Any suggestion?

$objWord = ObjCreate("Word.Application")
$objWord.Visible = True

$objDoc = $objWord.Documents.Add($Dir & "\" & $File)
$objSelection = $objWord.Selection
$objSelection.Find.Text = "Identificativo"
$objSelection.Find.Execute
$objSelection.MoveRight ("Unit:=wdCell")

Tanks

Gianluca

Edited by polps
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...