Disable Cursor/Shape from moving to the start/top of the page VSTO Word AddIn C#

Vivek Murli 0 Reputation points
2022-04-01T15:28:59.323+00:00

We have been able to create shapes and move it across a page in any direction(left,right,Up,Down). However the challenge is that when we move the shapes , the scroll bar automatically moves to the top of the first page in MS Word. Is there a way to disable this irrespective of the page we're in?

public void move()
{

object What = WdGoToItem.wdGoToGraphic;
object Which = WdGoToDirection.wdGoToAbsolute;
if (this.Application.Selection.Type != WdSelectionType.wdSelectionNormal)
{
  this.Application.Selection.GoTo(What: What, Which: Which, Count: 0);

}
}

Read a few posts online with no luck.

Any suggestions would be appreciated

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,180 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,452 questions
0 comments No comments
{count} votes