Replace value of a mapped field in word

Copper Contributor

Hi all, I have a use case, where there is a mapped field in word. This document is being used as a template document in another system. But I want to replace all commas in the field value with ^p or line break when I pass the field values to the template document. Would it be possible.

Thanks in advance.

8 Replies

@Nimmyraj How are the field values being "passed" to the template?  If you are using VBA, you could use the Replace function.

 

ValueforTemplate = Replace(SourceValue, ",", vbCr)

@Doug_Robbins_Word_MVP Hi Doug, thanks for your reply.. we are passing it as a field value from MFiles system. This document is being used as template document in our MFiles system

@Nimmyraj If you mean M-Files as at https://www.m-files.com, I would suggest that you contact the customer support at https://www.m-files.com/about/contact/

@Doug_Robbins_Word_MVP Hi Doug, we have been checking from there too, but nothing positive yet.. so was checking if word has any option of replacing the character

@Nimmyraj Your "passing it as a field value" does not really answer the question that I asked, which was:

 

"How are the field values being "passed" to the template?"

 

In other words, what is the passing mechanism?

Sorry, if I was not clear. we have MFiles document management system which has a feature of using word document as an input template. So have created a word document as a template document that accepts values as fields from the MFiles system. So the values are passed to the word from MFiles system and the field values are updated in the word document and the word document is saved back to the MFiles document management system. Hope it’s clear.

@Nimmyraj Unfortunately, you have still not provided any information on the mechanism by which the values from M-Files are passed to the fields in the Word Template.

 

If that mechanism is known, it may be possible to modify it.

@Doug_Robbins_Word_MVP thanks Doug for your help. And sorry for the delay in reply. I was trying to get more details about mechanisms, but could not find details. The usage of word documents is a feature of M-Files DMS. But for this issue, M-Files are trying to give us solution from their end.

Thanks again for your help. really appreciate.