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

Question

Question

match text by first and last word

asked on July 20, 2016

Hi,

So the idea is that i would like to choose in my form what i would like to be included in my word document like Exhibit A, Exhibit B  etc. if Exhibit A is not selected in the form then using workflow find and replace in update word document activity, find all the text that starts with Exhibit A and ends with some word and then replace that with empty space.

I tried using a merge field and getting all the text from either form or a token but it doesn't have any formatting once on a word document. So i am trying to achieve this other way around. By having all the text already in a word document and then removing that which is not needed. 

So far i haven't been able to achieve this using pattern matching or MS Word find's activity wildcards. 

Could someone please help me with find a way to select a paragraph with first and last word and delete that in a word document. 

Thanks

Junaid Inam

0 0

Replies

replied on July 21, 2016

It's not really clear to me what you're trying to do, but I don't believe there's a way to match paragraphs with regular expression. "Starts with "Exhibit A" and ends somewhere" is not quite a pattern.

The Update Word Document activity was designed to add data to a document, not remove it. Its find and replace feature is intended for exact matches.

It might be easier to think about it the other way around and start out with an empty document and insert the text corresponding to each "exhibit" into the Word document.

 

0 0
replied on July 21, 2016

Even if i know first and last word. Can i still select an entire paragraph even though it could have spaces and newlines in between? I saw Wildcards in Microsoft Find and thought maybe using Regular Expression i could find each paragraph and replace it with empty string. 

I tried to use HTML in forms with formatted text but after going through workflow it loses its formatting so i don't think that's what i need right now.

One way of keeping formatting is to have separate merge field for each formatting type and then replacing it with text but for long documents this is not feasible. 

0 0
replied on July 25, 2016

Find and Replace in Update Word is looking for an exact match. Inserting HTML formatted text is not currently supported.

If you want to manipulate the Word document directly to take advantage of its search functionality, you'll need to find a 3rd party library that supports it.

 

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

Sign in to reply to this post.