MPW
Well-known Member
- Joined
- Oct 7, 2009
- Messages
- 571
- Office Version
- 365
- Platform
- Windows
Hi All,
I am importing lines of text into a workbook using:
This works great except that it is not being converted correctly because of the usfm formatting of the original doc. Here is an example:
As you can see, it is not converting the quotes correctly. There are other inconsistences, but you get the idea.
As a test I manually copied this from the .sfm and pasted into the workbook. It was perfect. My question is "How do I copy and paste my info instead of the this = that method?"
Thanks
I am importing lines of text into a workbook using:
VBA Code:
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFso.GetFolder(ExcelFilesFolder) 'Path containing .sfm files.
For Each oFile In oFolder.Files
If UCase(Right(oFile, 4)) = ".SFM" Then
Open oFile For Input As #1
Do Until EOF(1)
Line Input #1, lineFromFile
If lineFromFile <> "" Then
r1 = r1 + 1
wb1.Sheets("Sheet1").Cells(r1, 1)= lineFromFile
End If
Loop
Close #1
End If
Next oFile
Rich (BB code):
“‘And you, O Bethlehem, in the land of Judah, are by no means least among the rulers of Judah; for from you shall come a ruler who will shepherd my people Israel.’”
---------------------------------------------------------------------becomes ---------------------------------------------------------------------
“‘And you, O Bethlehem, in the land of Judah, are by no means least among the rulers of Judah; for from you shall come a ruler who will shepherd my people Israel.’â€"
As a test I manually copied this from the .sfm and pasted into the workbook. It was perfect. My question is "How do I copy and paste my info instead of the this = that method?"
Thanks