delimiter

C

Curtiss Greer

How do I set the seperator in an import of text file in word. The recorded
macro went thru just fine. when run it stops on the set delimiter screen.
I've tried seperator="," did not help.
Thanks to all
(e-mail address removed)
 
J

Jeanette Cunningham

Curtiss,
in the design view of the macro,
on the specification line,
click the drop down arrow and choose the specification you want.
Save the macro.

If you don't have any saved specifications in the database, you need to
create one.
To create a spec, do a manual import of the file.
In the import wizard, click the Advanced button to create your spec.
Make sure you save the spec with an easy name to remember.

Now you have the spec to put in the macro in design view.
The macro should run OK now.


Jeanette Cunningham -- Melbourne Victoria Australia
 
C

Curt

lost on reply no import wizard is this due to my being in office 2000 In word
I just go to record new macro and do it. Went thru all the steps includeing
setting delimiter when recording. For some reason the delimiter setting does
not record. Will enclose my code as example. My text file is created from
excel with commas word reconized the row seperator by default.
Thanks for looking.

Selection.Range.InsertDatabase Format:=0, Style:=0, LinkToSource:=False, _
Connection:="", SQLStatement:= _
"SELECT Name_of_Entry, Contact_Person, Address, CityState, Zip_ FROM
C:\Parade\ZZZ.txt WHERE ((Name_of_Entry IS NOT NULL ) AND (Contact_Person IS
NOT NULL ) AND (Address IS NOT NULL ) AND (CityState IS NOT NULL ) AND (Zip_
IS NOT NULL ))" _
& "", PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument _
:="", WritePasswordTemplate:="", DataSource:="C:\Parade\ZZZ.txt",
From:= _
-1, To:=-1, IncludeFields:=True
ChangeFileOpenDirectory "C:\Parade\"
ActiveDocument.SaveAs FileName:="Ztable.doc",
FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False
CommandBars("Stop Recording").Visible = False

End Sub
 
J

Jeanette Cunningham

Curt,
I thought you were using an Access macro?


Jeanette Cunningham -- Melbourne Victoria Australia
 
C

Curt

Many have said I should of been useing acess. My responce is that many I know
who are in the pro bono community are older and do not know acess but do know
excel and word. Sure do appreciate your parpitation in the communties.
Thanks Again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top