You are viewing limited content. For full access, please sign in.

Question

Question

Insert RFT file

asked on June 21, 2018

Is it possible to insert an RFT file using an Update Word activity in workflow?

For example, we have a fairly large amount of boiler plate language at the bottom of a word doc and that language depends on certain factors.  Instead of having 5 different Word templates for the letter, I'd like to have one template.  Then at the bottom or the page I have a merge field <boilerplate>

I know I can do a «INSERT "C:\Users\test.rtf"» when doing an actual mail merge.  But that does not seem to work when using an Update word doc activity.

I'd like to be able to insert the appropriate rtf file into the <boilerplate> merge field by checking various conditions in workflow.  

I realize this is more organizational than file saving but was curious if you could do it.

 

Thanks,

Chris

 

 

0 0

Answer

SELECTED ANSWER
replied on June 21, 2018

Yeah, I figured. So I tried pushing Word to see what it can handle in its field properties. It looks like it allows a mail merge field inside a IncludeText field:

or, if you toggle field codes on both:

So now I have a field to inject the file name into the IncludeText field. This field will now appear in the Simple Merge option in the activity and you can use conditional decisions to pick which file you need to use and make a token with the name.

I haven't tried it, but I think if you need to have multiple files added, you can set up each one with a token and leave the value blank when the file shouldn't be inserted.

1 0

Replies

replied on June 21, 2018 Show version history

"IncludeText" works for me.

The only catch is that any path or URL you specify has to be available to the Workflow Server from the perspective of its service user. Any mapped drives need to be specified as UNC paths as service users don't see mapped drives.

But that's not a merge field, so I'm not seeing a good way to make that conditional.

0 0
replied on June 21, 2018 Show version history

The permissions make sense.  When I try this, it inserts the text immediately.

What we are looking for is to make that field a variable and insert different rtf files depending on actives in the workflow

 

 

 

 

0 0
SELECTED ANSWER
replied on June 21, 2018

Yeah, I figured. So I tried pushing Word to see what it can handle in its field properties. It looks like it allows a mail merge field inside a IncludeText field:

or, if you toggle field codes on both:

So now I have a field to inject the file name into the IncludeText field. This field will now appear in the Simple Merge option in the activity and you can use conditional decisions to pick which file you need to use and make a token with the name.

I haven't tried it, but I think if you need to have multiple files added, you can set up each one with a token and leave the value blank when the file shouldn't be inserted.

1 0
replied on June 21, 2018

Wow, that toggle field code is helpful.  I just tested this and it works.

I have the code in there and I have a token in workflow simply hard coded to the name of the file.  Then in the update word doc activity I am using said token instead and it pulled the right file.  Very helpful info Miruna, thank you.

0 0
replied on February 4, 2021

Hey Miruna,

 

Have you tried to use an INCLUDEPICTURE field with a mail merge field inside?  Chris was able to help me out getting it the includeText to work, but I ended up having to use an online utility to convert a png to an rtf file.  We are trying to make it as easy as possible for the client to manage the images if they need to change them in the future.

 

When I've tried using the IncludePicture, the merge field inside of it never gets pulled in via the import fields button on the update word document activity.  I've tried manually adding it, but still doesn't work. 

0 0
replied on May 10, 2021

I haven't tried INCLUDEPICTURE, but a quick internet search found this thread which suggests that while they should work, they don't work in the same way because unlike INCLUDETEXT, they still reference the image file after the merge rather than embedding it into the Word doc. So they're useless for our purpose since you're trying to give the file to somebody who won't have access to the WFServer's harddrive.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.