>Hello Everybody!
>I got problem with syntax trying to implement move to other(next) cell inside the table.
>
>Word basic says than the command has to be like that:
>Selection.MoveRight Unit:=wdCell, Count:=1, Extend:=wdMove
>
>But when I put it into VB6 and build dll
>oWord.Selection.MoveRight Unit:=wdCell, Count:=1, Extend:=wdMove
>It gives me an error Bad parameter. However if I'll comment all parameters it works
>oWord.Selection.MoveRight 'Unit:=wdCell, Count:=1, Extend:=wdMove
>but it works as a word right not as cell.
>
>I hope somebody can help me with that syntax becouse I need to use wdCell property.
Try this syntax (simply using numeric values instead of constants):
oWord.Selection.MoveRight 12, 1, 0
This is less elegant but it is working!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com