Hyperlink

121 views
Skip to first unread message

Muhammad Ali

unread,
Dec 5, 2014, 8:30:00 AM12/5/14
to node-of...@googlegroups.com
I am generating Word Document from officegen in Node.js. Now the problem is that I am facing an issue. I want to add hyperlink to a text. Make hyperlink active. How can I do that?


Regards
Ali

Ziv Barber

unread,
Feb 12, 2017, 10:54:08 AM2/12/17
to node.js officegen package
The last version (0.4.2, available on both git and npm) supporting both bookmarks and hyperlinks.

var pObj = docx.createP ();

// Hyperlinks to a bookmark somewhere:
pObj.addText ( 'Internal link', { hyperlink: 'myBookmark' } );

// ...

var pObj = docx.createP ();

// Start somewhere a bookmark:
pObj.startBookmark ( 'myBookmark' );

// ...

// You MUST close your bookmark:
pObj.endBookmark ();

Reply all
Reply to author
Forward
0 new messages