Chris.
Open the file, read the text into a string variable, and Paste Special as unformatted text.
Chris.
Open the file, read the text into a string variable, and Paste Special as unformatted text.
Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
> Open the file, read the text into a string variable
Oh good! Now I have thirty-seven ways of doing it (grin!).
I elected to save the range and the immediate style (usually Normal), insert File, contract the range.end by two positions, then re-apply the immediate style to the range of inserted text.
The accompanying macro works fine, and I can modify it, but ....
It seems that InsertFile, when obtaining data from an ASCII text file, chooses the paragraph style "Plain Text". I can see no straightforward means of causing InsertFile to use "Normal" style - or to set any user-default in place of Plain text.
Am I missing something here?
<pre>Public Sub udf_AddressFromFile()
Dim strFile As String
strFile = "d:greavespcfENV.TXT"
If boolFileExists(strFile) Then
Selection.InsertFile FileName:=strFile, Range:="", ConfirmConversions:=False, _
Link:=False, Attachment:=False
Selection.MoveUp Unit:=wdParagraph, Count:=1
Call cmd_GlueReturns
Else
End If
End Sub
</pre>