Hello, hope all is well. Not sure if that has been reported or not but when a hyperlink is added to a document it causes word to prompt "Word found unreadable content in...". I am using the latest version rc-7.
I had added hyperlinks to a document I was creating and found that they were the issue. I then created the document in the hyperlinks demo and the issue was reproduced.
Here is a stackblitz of the issue: https://stackblitz.com/edit/angular-hm59la
Will look into this
I'm having the same issue. Here's what I've done:
( async () => {
const doc = new Document();
const content = [
new Paragraph ({
children: [
doc.createHyperlink('https://example.com', 'hyperlink')
]
})
];
doc.addSection({
properties: {},
children: content,
});
let buffer;
try {
buffer = await Packer.toBuffer(doc);
} catch (err) {
return Promise.reject(err);
}
let file = `${process.env.HOME}/hyperlink.docx`;
require('fs').writeFileSync(file, buffer);
})()
If you try to open the file you'll see this:

I'm using Node.js v10.16.0 and docx v5.0.0-rc7, and MS Word for Mac v16.31
I think this is fix with #448
if i'm true a new release to npm of the docxjs and an new import would fix the problem :)
@rvergar7 @jwerre try using docxjs from master and see if you still have the problem
@dolanmiu would it be possible to do a new release i'm currently using a fork with the fix but i would prefer to be base on this project
@Sraleik Yup! A release will be made very soon, just need to update the gif graphic on the README
This demo should also be updated, right?
Should be up to date
This is fixed now, an example of how to do it is here:
https://github.com/dolanmiu/docx/blob/master/demo/35-hyperlinks.ts
Most helpful comment
I'm having the same issue. Here's what I've done:
If you try to open the file you'll see this:
I'm using Node.js v10.16.0 and docx v5.0.0-rc7, and MS Word for Mac v16.31