![]() |
|
#1
|
||||
|
||||
![]()
If I understand your request correctly, you need to add a condition to modify only unfilled cells e.g.
Code:
Set oCell = oDoc.Tables(1).Rows(iRow).Cells(5).Range oCell.End = oCell.End - 1 If Len(oCell) = 0 Then 'Add This line oCell.FormattedText = oRng.FormattedText 'use this line to keep the formatting 'oCell.Text = oRng.Text 'use this line if the formatting is not required Exit Do End If 'And this one
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#2
|
||||
|
||||
![]()
welcome back sir.
Code just worked fine[for my old files]. Unfortunately my database provider have changed entire file system so I will ask accordingly in new thread. can be marked as solved. |
![]() |
Tags |
data merge, ms word 2010, vba code |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
search on multiple word documents | Guy Roth | Word | 7 | 03-06-2017 01:31 PM |
![]() |
NovaScotia | Word | 4 | 01-21-2015 11:44 PM |
![]() |
beirput | Word | 3 | 11-10-2014 02:53 AM |
![]() |
Cimballi | Word | 3 | 07-01-2014 03:45 AM |
How to preserve or Retain bookmarks during Merging of word documents | ramsgarla | Word | 2 | 09-18-2012 08:59 AM |