Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 11-25-2015, 08:55 PM
PRA007's Avatar
PRA007 PRA007 is offline Extracting data from excel document using word Windows 7 32bit Extracting data from excel document using word Office 2010 32bit
Competent Performer
Extracting data from excel document using word
 
Join Date: Dec 2014
Location: Ahmedabad, Gujrat, India
Posts: 145
PRA007 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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 View Post
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
Reply With Quote
 

Tags
excel vba, word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting data from excel document using word Extracting Data from Word Documents Atomizer Word VBA 3 08-24-2015 04:49 PM
Extracting data from excel document using word extracting data from word docs stubevh Word 2 03-04-2015 06:27 PM
Extracting data from excel document using word Extracting data from excel Eric855 Word 6 07-25-2013 08:02 AM
Extracting data from excel document using word Extracting text from a Word Doc into Excel dgcarlin Word VBA 1 07-06-2012 05:46 PM
Extracting Contacts Data from Excel Caesar Outlook 1 05-08-2011 05:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft