Reply
 
Thread Tools Display Modes
  #1   Report Post  
Kenneth
 
Posts: n/a
Default Conversion of "Plain Text"...?


Howdy,

I have a routine in my database that writes a TXT file and
then calls a Word 2000 macro.

The macro simply formats the file and prints it a particular
way.

The problem is that I sometimes have upper ASCII (accented)
characters in the TXT file, and Word changes them to blanks.

With some experimentation, I have found that the problem is
in the conversion process. If I manually tell Word to format
the TXT file as "Plain Text" all is well.

I can solve my problem in two ways (that I can see.)

One would be if I can set Word to default to that formatting
for all TXT files.

The other would be if I can include in the macro some code
to specify that formatting.

Can you help with either?

Thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."
  #2   Report Post  
Kenneth
 
Posts: n/a
Default

On Mon, 09 May 2005 17:40:47 -0400, Kenneth
wrote:


Howdy,

I have a routine in my database that writes a TXT file and
then calls a Word 2000 macro.

The macro simply formats the file and prints it a particular
way.

The problem is that I sometimes have upper ASCII (accented)
characters in the TXT file, and Word changes them to blanks.

With some experimentation, I have found that the problem is
in the conversion process. If I manually tell Word to format
the TXT file as "Plain Text" all is well.

I can solve my problem in two ways (that I can see.)

One would be if I can set Word to default to that formatting
for all TXT files.

The other would be if I can include in the macro some code
to specify that formatting.

Can you help with either?

Thanks,


Hello again,

In the hope that I could figure out how to enter the proper
conversion command in my macro, I just did it manually two
different ways with the Macro Recorder on.

I chose "Western European (Windows)" for Macro5, and
"Vietnamese (Windows) for Macro6.

To my surprise, the code generated by these two distinct
processes was identical:

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 5/9/2005 by XXXXXXXX
'
Selection.InsertFile FileName:="ROSTER.TXT", Range:="",
ConfirmConversions _
:=False, Link:=False, Attachment:=False
End Sub

Sub Macro6()
'
' Macro6 Macro
' Macro recorded 5/9/2005 by XXXXXXXX
'
Selection.InsertFile FileName:="ROSTER.TXT", Range:="",
ConfirmConversions _
:=False, Link:=False, Attachment:=False
End Sub


Might you know the code to use the Western European
(Windows) conversion?

Sincere thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."
  #3   Report Post  
Klaus Linke
 
Posts: n/a
Default

Word2000 did this differently from newer versions, I think.=20
Maybe you can find some sample code if you look in the VBA help under =
..OpenEncoding and .SaveEncoding?

Regards,
Klaus


"Kenneth" schrieb im Newsbeitrag =
...
On Mon, 09 May 2005 17:40:47 -0400, Kenneth
wrote:
=20

Howdy,

I have a routine in my database that writes a TXT file and
then calls a Word 2000 macro.

The macro simply formats the file and prints it a particular
way.

The problem is that I sometimes have upper ASCII (accented)
characters in the TXT file, and Word changes them to blanks.

With some experimentation, I have found that the problem is
in the conversion process. If I manually tell Word to format
the TXT file as "Plain Text" all is well.

I can solve my problem in two ways (that I can see.)

One would be if I can set Word to default to that formatting
for all TXT files.

The other would be if I can include in the macro some code
to specify that formatting.

Can you help with either?

Thanks,

=20
Hello again,
=20
In the hope that I could figure out how to enter the proper
conversion command in my macro, I just did it manually two
different ways with the Macro Recorder on.
=20
I chose "Western European (Windows)" for Macro5, and
"Vietnamese (Windows) for Macro6.
=20
To my surprise, the code generated by these two distinct
processes was identical:
=20
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 5/9/2005 by XXXXXXXX
'
Selection.InsertFile FileName:=3D"ROSTER.TXT", Range:=3D"",
ConfirmConversions _
:=3DFalse, Link:=3DFalse, Attachment:=3DFalse
End Sub
=20
Sub Macro6()
'
' Macro6 Macro
' Macro recorded 5/9/2005 by XXXXXXXX
'
Selection.InsertFile FileName:=3D"ROSTER.TXT", Range:=3D"",
ConfirmConversions _
:=3DFalse, Link:=3DFalse, Attachment:=3DFalse
End Sub
=20
=20
Might you know the code to use the Western European
(Windows) conversion?
=20
Sincere thanks,
--=20
Kenneth
=20
If you email... Please remove the "SPAMLESS."

  #4   Report Post  
Kenneth
 
Posts: n/a
Default

On Tue, 10 May 2005 03:23:41 +0200, "Klaus Linke"
wrote:



"Kenneth" schrieb im Newsbeitrag ...
On Mon, 09 May 2005 17:40:47 -0400, Kenneth
wrote:


Howdy,

I have a routine in my database that writes a TXT file and
then calls a Word 2000 macro.

The macro simply formats the file and prints it a particular
way.

The problem is that I sometimes have upper ASCII (accented)
characters in the TXT file, and Word changes them to blanks.

With some experimentation, I have found that the problem is
in the conversion process. If I manually tell Word to format
the TXT file as "Plain Text" all is well.

I can solve my problem in two ways (that I can see.)

One would be if I can set Word to default to that formatting
for all TXT files.

The other would be if I can include in the macro some code
to specify that formatting.

Can you help with either?

Thanks,


Hello again,

In the hope that I could figure out how to enter the proper
conversion command in my macro, I just did it manually two
different ways with the Macro Recorder on.

I chose "Western European (Windows)" for Macro5, and
"Vietnamese (Windows) for Macro6.

To my surprise, the code generated by these two distinct
processes was identical:

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 5/9/2005 by XXXXXXXX
'
Selection.InsertFile FileName:="ROSTER.TXT", Range:="",
ConfirmConversions _
:=False, Link:=False, Attachment:=False
End Sub

Sub Macro6()
'
' Macro6 Macro
' Macro recorded 5/9/2005 by XXXXXXXX
'
Selection.InsertFile FileName:="ROSTER.TXT", Range:="",
ConfirmConversions _
:=False, Link:=False, Attachment:=False
End Sub


Might you know the code to use the Western European
(Windows) conversion?

Sincere thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."


Word2000 did this differently from newer versions, I think.
Maybe you can find some sample code if you look in the VBA help under .OpenEncoding and .SaveEncoding?

Regards,
Klaus



Hi Klaus,

I thank you for your suggestion, but (if I am interpreting
the helpfile properly) it seems that the command
..OpenEncoding returns the encoding, but does not set it.

All the best,
--
Kenneth

If you email... Please remove the "SPAMLESS."
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I easily create a tab-delimited file from plain text in Word? mpiper Microsoft Word Help 1 March 8th 05 09:47 PM
Plain text formatting entire document MDavison Formatting Long Documents 7 February 24th 05 06:19 PM
Numbers to appear at the cursor... ~D~ New Users 11 February 1st 05 04:49 AM
Vba for 'Field to plain text' [Shift][Ctrl][F9] D Bernhardt via OfficeKB.com Mailmerge 3 January 10th 05 11:00 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM


All times are GMT +1. The time now is 08:51 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"