Home > other >  Vb.net how to select a page of a section in the word
Vb.net how to select a page of a section in the word

Time:09-24

,
Vb.net how to select a page of a section in the word

Dim cuPage As Word. Range
Dim cuParagh As Word. Com.lowagie.text.paragraph

CuPage=myWordDocument. GoTo (wdGoToPage wdGoToAbsolute, PageIndex) 'positioning to a specific page

CuParagh=cuPage. GoTo (wdGoToLine, 1, ParaghIndex)
CuParagh=cuPage. Paragraphs (ParaghIndex) 'positioning to specific a

The last two sentences runtime error code

But through the section as can
MyWordDocument. Sections (2). Range. Paragraphs (ParaghIndex). LineSpacing

Is there a way to through the page to access the page sections

CodePudding user response:

Has been solved, through the selection to handle
MySelection=app. Selection
MySelection. GoTo (wdGoToPage wdGoToAbsolute, PageIndex)
MyWordDocument. Bookmarks (\ "page"). The Range, the Select ()
Result. The LineSpacing=mySelection. Range. Paragraphs (ParaghIndex). LineSpacing
  • Related