![]() |
|
#13
|
||||
|
||||
|
With cell referencing, you could use:
Code:
Sub Data_Append()
Dim mypath As String
mypath = ThisDocument.Path & "\log.txt"
Dim Rng As Range
Dim i As Long
Dim StrData As String
Dim filenr As Long
filenr = FreeFile
With ThisDocument.Tables(1)
For i = 1 To 4
Set Rng = .Cell(i, 1).Range
With Rng
.End = .End - 1
StrData = StrData & "," & .Text
End With
Next
End With
StrData = Left(StrData, Len(StrData) - 1)
Open mypath For Append As #filenr
Print #filenr, StrData
Close #filenr
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| import outline into existing file | eNGiNe | PowerPoint | 0 | 02-18-2015 05:56 AM |
| new style for append only | thebrin | Word | 0 | 02-03-2015 06:03 PM |
How to append specific *.tif image with another tif file through Word VBA
|
aarun2 | Word VBA | 1 | 04-08-2014 03:20 PM |
| sending data from UserForm of existing excel file to a new excel file | saltlakebuffalo | Excel Programming | 0 | 02-13-2014 10:55 PM |
| adding a pst file to an existing pst file | falcodriver | Outlook | 2 | 12-14-2011 08:16 AM |