Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Use Word Field Codes in Render Tool

StefanWe
6 - Meteoroid

Hello everybody. 

 

we built an solution in alteryx that is creating Word Documents. In these Documents we want to show the current date. Since the documents are further processed outside alteryx we cannot just add a fixed date. Our plan was to add a field in word automatically via alteryx. I've seen html to word render tools that accepted 

 

<span style="mso-field-code: DATE \@ 'dd.MM.yyyy' \*MERGEFORMAT"></span><span style='mso-field-code: DATE'>

 

However the Alteryx render does not accept this (I added it via Report Text Tool as RawPCXML text. Is there any way to add the date? 

Thanks a lot! 

Stefan

2 REPLIES 2
KGT
13 - Pulsar

I haven't seen this done, but it sounds plausible, just depends on what MS Word does with that once you output it... I'm not sure if that code is evaluated on presentation, or natively in the data. The way that you would check your output vs Word having that field, is set up a simple doc with the relevant field and output one to another doc set up the same. Then look at the 2 docx files, unzip them and compare the XML's. There's a chance that a ton of other info will be different, but it's worth a try to see the diff between creating it in Word vs Alteryx. This may also show you how you could manually edit that XML set as well.

 

Other options include using the BLOB method to output to a template, or using <htmlpassthrough> to have the code pass through as code.

 

Check out these links:

 

OTrieger
14 - Magnetar

@StefanWe 
It will not work if you will try to output this code to Word, as Word does not understand it as text. This will work only with docx type of file as docx file are basically an XML zipped files. The code that you shared is coming from the XML files.

 

So potentially if you have a Word Doc template for that report that you will always will use. You can use it as your input files to Alteryx then change the XML file, with new content and such of codes that you just shared, then write it out and zip it back and rename the zip file to .docx and you will have the new file with all the data.

 

There is lots of data in these XML files and you will need to ensure that you do not change the structure of it other wise you will get issues.

 

It can lead to a very complex workflow, nevertheless it is possible, I did it several times in the past and managed to get reports in Word files automated in Alteryx.

Labels
Top Solution Authors