LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling page displayed in MS Word

Solved!
Go to solution

Hi,

 

I'm trying to control the pages displayed in MS Word by jumping to them. I can jump to previous, and next, but I can't jump to a page I want to.

 

I know I am doing something wrong with the invoke node (see below, full code attached), but I don't know what because I don't know the syntax (if that's the right term, please correct me if I'm wrong).

 

I have tried just about everything, but it doesn't like it!

 

The macro command is:

 

Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:="2"

 

Thanks

 

Andy

  Image1.jpg

Download All
0 Kudos
Message 1 of 3
(2,488 Views)
Solution
Accepted by topic author AndyF

Hi Andy,

use the "wdGoToPage" constant, as you do for the other functions.

See the attached picture.

 

You can connect the new page also as string.

 

Mike

Message 2 of 3
(2,471 Views)

Mike,

 

That's great! Thank you!Smiley Happy

 

It works perfect. I was going to add a control to set the page number, but didn't as I was struggling to get it working in the first place.

 

Thanks for showing me how to wire up the Close Reference too, I was wondering how to do that.

 

All I need to do now is get the document to display on the front panel rather than in a separate window, but I should be able to figure this out.

 

Thanks again!

 

Andy

0 Kudos
Message 3 of 3
(2,462 Views)