- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 10:47 AM
I currently have a Script Include that is create an HTML object that I am then using GlideSysAttachment.write() to create a .doc file, however we would prefer to make a .docx however so far our efforts haven't worked.
I've created a small example of what we're currently doing to make the .doc file so that is may help with finding a solution. I've left the meta line in because I think something about it may lead to a solution:
var html = '<html><head>';
html += '<meta http-equiv="content-type" content="text/html" charset="utf-8">';
html += '</head><body></body></html>';
var gsa = GlideSysAttachment();
var fileName = 'file.doc'
gsa.write(current, fileName, 'application/msword', html);
Below is what we've tried to make the html into a .docx and currently causes an issue when trying to open the outputted file:
var html = '<html><head>';
html += '<meta http-equiv="content-type" content="text/html" charset="utf-8">';
html += '</head><body></body></html>';
var gsa = GlideSysAttachment();
var fileName = 'file.docx'
gsa.write(current, fileName, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', html);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 01:27 PM
Hi DJ,
I suggest you create a Support Case to see if the Content Type you have is supported by the platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 01:27 PM
Hi DJ,
I suggest you create a Support Case to see if the Content Type you have is supported by the platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 08:24 AM
I followed up through Support and was suggested to make an idea portal post... Here's the link: https://support.servicenow.com/ideas?id=view_idea&sysparm_idea_id=244c2d48470cf9102c31b98a436d4387&s...