Insert page break after every hyperlink problem

L

lee

Hi,

I want to insert a page break after every hyperlink, if I try the
InsertBreak then it replaces the hyperlink text/link, how do it make
it happen after this link ?

Many Thanks,
Lee.


Hyperlinks hyplnks;
Hyperlink hyplnk;

Range rg = testDoc.GetContent();

hyplnks.AttachDispatch(rg.GetHyperlinks());

for (long j=1;j<=hyplnks.GetCount()-1;j++)
{
COleVariant n = COleVariant((long)j);
hyplnk.AttachDispatch(hyplnks.Item(n));

Range oSecRange = hyplnk.GetRange();
oSecRange.InsertBreak(COleVariant((long)7)); // 7 = wdPageBreak
}
 

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