Use this to import a text file as text members. Each paragraph is made into a cast member. Make a text member named "copySource" with all the formatting you want.
This is a solution for importing text prior to D7.
--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know. :-)
on makeTextMembers whichFile
set myFile = new(xtra "fileio")
openFile(myFile, whichFile, 1)
set theFile = readFile(myFile)
closeFile(myFile)
set myFile = 0
set howManylines = the number of lines in theFile
repeat with x = 1 to howManylines
if line x of theFile <> " " and line x of theFile <> "" then
set howManyMembers = the number of members of castlib 1
duplicate member "copySource"
set thisString = line x of theFile
if char 1 of thisString = " " then
set thisString = char 2 to (the number of chars in thisString) of thisString
end if
set the name of member (howManyMembers + 1) to thisString
set the text of member (howManyMembers + 1) = thisString
end if
end repeat
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA