![]() |
|
#4
|
||||
|
||||
|
No, that's not how you would use Instr. You have to open both file before you can test the xml file's contents with Instr. For example, to test each image from your "ImageNames.txt" file:
Code:
Dim I As Long
With #hFile
For I = 0 To UBound(Split(sRegImageFile, vbCr))
If InStr(.Text, Split(sRegImageFile, vbCr)(I)) = 0 Then
'The image name isn't present, so add it.
'Your code to add the image goes here
End If
Next
End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| vba word |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
cannot check/uncheck check box but added check box
|
learn2office | Word | 1 | 11-27-2012 02:02 AM |
Appending the filename with the current date
|
sheeand | Word VBA | 2 | 05-14-2012 05:18 AM |
Word Macro That Checks a Check Box Form Field When File Print is Executed
|
DKerne | Word VBA | 4 | 06-09-2011 11:54 AM |
| Appending Word Docs | Frank | Word | 0 | 02-26-2010 04:38 PM |
| Saving Word document creates a duplicate transparent file | bbailey | Word | 0 | 12-05-2009 10:54 PM |