![]() |
|
#2
|
|||
|
|||
|
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim strPath As String, strFileName As String
Dim oDoc As Word.Document
strPath = ThisDocument.Path & Application.PathSeparator
strFileName = Dir$(strPath & "*.doc")
While Len(strFileName) <> 0
If Not strFileName = ThisDocument.Name Then
Set oDoc = Documents.Open(strFileName, , , False, , , , , , , , False)
On Error Resume Next
oDoc.Tables(1).Cell(3, 3).Range.Text = _
Left(ThisDocument.Tables(1).Cell(2, 3).Range.Text, Len(ThisDocument.Tables(1).Cell(2, 3).Range.Text) - 2)
On Error GoTo 0
oDoc.Close wdSaveChanges
End If
strFileName = Dir$()
Wend
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro for find/replace (including headers and footers) for multiple documents | jpb103 | Word VBA | 2 | 05-16-2014 04:59 AM |
| Macro to copy formula from one cell to another | anwar | Excel Programming | 1 | 04-25-2014 08:27 PM |
sumproduct formula to pull info from multiple sheets
|
Berk21 | Excel | 7 | 01-15-2012 11:41 AM |
Copy table cell formatting across multiple cells / tables
|
pakistanray | Word Tables | 2 | 10-31-2011 08:07 AM |
| copy cell from sheet 2 to sheet 3 macro | slipperyjim | Excel Programming | 1 | 02-18-2010 01:31 AM |