![]() |
|
#2
|
||||
|
||||
|
Maybe the following is more what you had in mind.
Code:
Dim TextFile As Integer
Dim FilePath As String
Dim FileContent As String
Dim FileNum As Integer
Dim DataLine As String
'File Path of Text File
FilePath = "E:\Zmani\Logging\202004011500__Tmp_61385499383529 09.py_.txt"
FileNum = FreeFile()
Open FilePath For Input As #FileNum
While Not EOF(FileNum)
Line Input #FileNum, DataLine
FileContent = FileContent & DataLine & vbCr
Wend
FileContent = Left(FileContent, Len(FileContent) - 1)
Close
'Report Out Text File Contents
MsgBox FileContent
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To Make 2013 Populate To Field | abraxis | Outlook | 2 | 08-10-2018 06:41 AM |
| populate list with unique field value on repeated field value | sukusnairss | Excel | 1 | 04-03-2018 11:47 PM |
| Have Text Entered in Content Control / PreDefined Field Populate Field in Footer | bzowk | Word | 1 | 04-14-2016 11:50 AM |
Prompt a macro to run when opening a specific file type
|
gmanword | Word VBA | 5 | 11-30-2013 02:55 PM |
| Openin File in Use Locks PC Up, No Read only Prompt | barkster | Office | 0 | 06-08-2010 01:22 PM |