Changing ActivePage in VBA

R

Rick Ruud

Does anyone know how to change the activepage in vba as in
ThisDocument.ActiveView.ActivePage so I can cause a different page to be
displayed? I can't seem to find it, but I can't believe it can't be done.

Thanks in advance,
 
E

Ed Bennett

Rick Ruud said:
Does anyone know how to change the activepage in vba as in
ThisDocument.ActiveView.ActivePage so I can cause a different page to
be displayed? I can't seem to find it, but I can't believe it can't
be done.

When I'm coding in VB6, I use
Set ActiveDocument.ActiveView.ActivePage = ActiveDocument.Pages(index)
(ThisDocument is inaccessible from VB6, as VB6 does not run within a
particular document)

However, changing ActiveDocument to ThisDocument does not always allow the
code to run in Publisher for some reason.

(Just by the way, in VB.NET, the code is
[Publisher Application].ActiveDocument.ActiveView.ActivePage = _
[Publisher Application].ActiveDocument.Pages(index)

Note the absence of the "Set" keyword)
 
Joined
Sep 11, 2015
Messages
5
Reaction score
0
i tried Set ActiveDocument.ActiveView.ActivePage = ActiveDocument.Pages(2) but it does not work

did you find the solution rick
 
Joined
Sep 11, 2015
Messages
5
Reaction score
0
nevermind found it

ActiveDocument.ActiveView.ActivePage = ActiveDocument.Pages(z)

no set required
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top