Quote:
Originally Posted by macropod
If nothing is found, there is nothing to process and, hence, nothing to add.
|
As I told, I don't have much knowledge right not regarding vba. I don't know from the code where to skip adding data.
For example
Code:
With .Cell(i, 4).Range
If Len(.Text) > 2 Then
.InsertBefore "Er.Prio: " & StrTxt3 & vbCr
Else
.InsertBefore "Er.Prio: " & StrTxt3
End If
from above code it is adding
Er.Prio: everywhere irrespective of column 2 search find.
Quote:
Originally Posted by macropod
What if there is less than 5 paragraphs or more than 5 paragraphs?
|
As I told, I don't have much knowledge right not regarding vba. I Just want to start My search from .Cell(i, 2).Range.Paragraphs(1) but not limited to paragraph(1). There are more/less than one paragraph sometimes in the document.
I don't know how to make this things happen.
My search string is
Code:
WO [0-9]{5,} [A-Z0-9]{1,2}^13*13[A-VX-Z][A-Z]
Please note that this string has nothing to do with current code but have much usefulness on overall process. please see
Quote:
2. If column 2 first paragraph contains WO number like WO 2015171641 A1, and if there is no paragraph 3.
for example
column 2 cell
WO 2015171641 A1¶
Some text¤
I want to search WO number and add in main.docx following data from database.xlsx.
column 3 = add text "International Publication"
column 4 = Column E from Database.
column 5 = column B from database &vbCr & column C from database
|