ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Questions (https://www.excelbanter.com/excel-programming/284879-macro-questions.html)

filmfatale[_3_]

Macro Questions
 

I have a mail merge document (in Word and/or text format) in which i
want to import multiple lines of text into 1 field. The word document
is html text

I got halp from a forum member, and he gave me this macro

Sub gethtml()
fn = "c:\test.htm"
Open fn For Input As #1
Do While Not EOF(1)
Line Input #1, a
Cells(1, 1).Value = Cells(1, 1).Value + Chr$(13) + a
Loop
Close #1

End Sub

Hovever, my document has 2 sets of html text in one document, and I
want to put the first set of html text in the first cell, and put the
second set of text in the next field. For example, I need the first set
of text data needs to go into cell D2, the next set of text into cell
D3,D4, D5.......etc.

Part 2: When the lines are copying into the cell, I need the data to
remain
in it's original format. I will be saving the imported data into a tab

delimited text file, prior to uploading to my online auction software.
When
I tried to save the worksheet as tab delimited text file, after running
the
Macro, there were tabs in between the html text. The data imported by
the macro has tabs, and the data that i did a copy and paste on has no
tabs)

Thank you so much for your help!


---
~~ Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 06:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com