Dim pDoc as Word.Document
Set pDoc = Documents.Open(FileName:="C:\.......txt",
Format:=wdOpenFormatText)
If that doesn't work with your file format, use
Set pDoc = Documents.Open(FileName:="C:\.......txt", _
Format:=FileConverters("[Format]").OpenFormat)
Where [Format] is whatever you select in the 'Files of type' list to open
your file if you're doing it manually.
> I want to import a DOS-file into Word 2000 with norwegian characters using
> VBA Documents.Open.
>
> Can anyone tell how.
Per - 21 Jan 2005 17:15 GMT
Thank you for answering.
When I use:
Set pDoc = Documents.Open(FileName:="C:\.......txt",_
Format:=wdOpenFormatText)
the text is imported without our national characters.
When I use:
Set pDoc = Documents.Open(FileName:="C:\.......txt", _
Format:=FileConverters("[Format]").OpenFormat)
Format = "MS-DOS text with Layout"
I get this error: Kommandoen mislyktes (Failure)
This is maybe a special norwegian problem?
Jezebel skrev:
> Dim pDoc as Word.Document
> Set pDoc = Documents.Open(FileName:="C:\.......txt",
[quoted text clipped - 12 lines]
> >
> > Can anyone tell how.