Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
cocciastella cocciastella is offline
external usenet poster
 
Posts: 7
Default How do I get symbols to display in mail merge

How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the txt
datasource to rtf format and then inserting into word doc so the datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to change
the code page? How is that be done?

Thank you

Thanks!




  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How do I get symbols to display in mail merge

You can use the txt file itself as the datasource and if it contains those
symbols, they will appear in the merged output.

--
Hope this helps

Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to avail yourself of my
services on a paid, professional basis.

"cocciastella" wrote in message
...
How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the
txt
datasource to rtf format and then inserting into word doc so the
datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In
the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to
change
the code page? How is that be done?

Thank you

Thanks!






  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
cocciastella cocciastella is offline
external usenet poster
 
Posts: 7
Default How do I get symbols to display in mail merge

Doug,

Thank you for responding. I had an earlier post on this issue when I looked
for a response I did not see it so I reposted this question. I responded to
the previous question and here to you.
I am creating the datasource as a text (.txt) file and when am in word and
go throught the mail merge routine and select recipients as the txt
datasource all is good and it merges with the symbols. But when the merge is
called from the user interface and the program executes the merge I get
square boxes a backwards squiggly E for copyright and registered trademark
and a large dot for the trademark. characters. I use the Progress language
and the font is Tahoma.

Lonnie
"Doug Robbins - Word MVP" wrote:

You can use the txt file itself as the datasource and if it contains those
symbols, they will appear in the merged output.

--
Hope this helps

Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to avail yourself of my
services on a paid, professional basis.

"cocciastella" wrote in message
...
How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the
txt
datasource to rtf format and then inserting into word doc so the
datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In
the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to
change
the code page? How is that be done?

Thank you

Thanks!






.

  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How do I get symbols to display in mail merge

This could happen if Progress encodes the text file containing the TM
character using the Unicode UTF-8 encoding, but does not put a "Byte
Order Mark" (BOM) at the beginning of the file. (see
http://en.wikipedia.org/wiki/Byte-order_mark for further information on BOM)

In a UTF-8 file, the BOM consists of 3 octets ("bytes") with codes
239
187
191

You could use the following macro to see what is in the first three
bytes in /your/ file:

Sub show3octets()
' (no error checking yet)
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your data source file here
Const strInputPath As String = "c:\myfiles\myinput.txt"

Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
MsgBox "The first three characters are " & _
CStr(Asc(c1)) & ", " & _
CStr(Asc(c2)) & " and " & _
CStr(Asc(c3)) & "."
Close 1

End Sub

If there is no BOM, you could convert your file to a new file with a BOM
using the following code. However, you should only do this if the file
is definitely encoded as UTF-8 (sorry, I don't have code to check that
here!)

Sub insertBOM()
' (no error checking yet)
Dim c As String * 1
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your input data file here
Const strInputPath As String = "c:\myfiles\myinput.txt"
' Put the pathname of your output data file here
Const strOutputPath As String = "c:\myfiles\myoutput.txt"

' Let's at least check that there is no BOM
Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
If Asc(c1) = 239 And Asc(c2) = 187 And Asc(c3) = 191 Then
MsgBox "Already contains a Byte Order Mark?"
Else
Open strOutputPath For Binary As 2
c = Chr(239)
Put 2, , c
c = Chr(187)
Put 2, , c
c = Chr(191)
Put 2, , c
Put 2, , c1
Put 2, , c2
Put 2, , c3
Get 1, , c
While Not EOF(1)
Put 2, , c
Get 1, , c
Wend
Close 2
End If
Close 1

End Sub

It is possible that Progress is using some other encoding such as a
16-bit Unicode encoding, but judging from your experience so far it is
likely to be UTF-8.

That's about the best I can do without actually inspecting your data
source file.

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/10/2009 05:08, cocciastella wrote:
How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the txt
datasource to rtf format and then inserting into word doc so the datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to change
the code page? How is that be done?

Thank you

Thanks!




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How do I get symbols to display in mail merge

Hi Peter,

Where did the "Progress" come from?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"Peter Jamieson" wrote in message
...
This could happen if Progress encodes the text file containing the TM
character using the Unicode UTF-8 encoding, but does not put a "Byte Order
Mark" (BOM) at the beginning of the file. (see
http://en.wikipedia.org/wiki/Byte-order_mark for further information on
BOM)

In a UTF-8 file, the BOM consists of 3 octets ("bytes") with codes
239
187
191

You could use the following macro to see what is in the first three bytes
in /your/ file:

Sub show3octets()
' (no error checking yet)
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your data source file here
Const strInputPath As String = "c:\myfiles\myinput.txt"

Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
MsgBox "The first three characters are " & _
CStr(Asc(c1)) & ", " & _
CStr(Asc(c2)) & " and " & _
CStr(Asc(c3)) & "."
Close 1

End Sub

If there is no BOM, you could convert your file to a new file with a BOM
using the following code. However, you should only do this if the file is
definitely encoded as UTF-8 (sorry, I don't have code to check that here!)

Sub insertBOM()
' (no error checking yet)
Dim c As String * 1
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your input data file here
Const strInputPath As String = "c:\myfiles\myinput.txt"
' Put the pathname of your output data file here
Const strOutputPath As String = "c:\myfiles\myoutput.txt"

' Let's at least check that there is no BOM
Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
If Asc(c1) = 239 And Asc(c2) = 187 And Asc(c3) = 191 Then
MsgBox "Already contains a Byte Order Mark?"
Else
Open strOutputPath For Binary As 2
c = Chr(239)
Put 2, , c
c = Chr(187)
Put 2, , c
c = Chr(191)
Put 2, , c
Put 2, , c1
Put 2, , c2
Put 2, , c3
Get 1, , c
While Not EOF(1)
Put 2, , c
Get 1, , c
Wend
Close 2
End If
Close 1

End Sub

It is possible that Progress is using some other encoding such as a 16-bit
Unicode encoding, but judging from your experience so far it is likely to
be UTF-8.

That's about the best I can do without actually inspecting your data
source file.

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/10/2009 05:08, cocciastella wrote:
How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the
txt
datasource to rtf format and then inserting into word doc so the
datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In
the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to
change
the code page? How is that be done?

Thank you

Thanks!







  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
cocciastella cocciastella is offline
external usenet poster
 
Posts: 7
Default How do I get symbols to display in mail merge

Peter,

In discussions today we were thinking about using utf-8. Thank you for the
code so we can check it out, it's very helpful!!

The DB is Progress 8.3 and the code page is ico8859-1 which does not have
the TM, but in the UI the user can type Alt-0153 and it puts in a thick bar.
When I pull the data and write it to a text file the symbols are there. Also
the text file has to have a font that will display the charactes. I am using
Tahoma. There was a solution I found to save the text as an rtf and then
insert that into a word doc. Use the word doc as the datasourse. I cut out
the word doc and merge with the rtf file. I finally got that to work today
so I feel hopeful. I am not to great with the automation object in Progress.
On the SaveAs I can name the encoding and am using msoEncodingWestern and
word 2007 seems to like it.

Lonnie

"Peter Jamieson" wrote:

This could happen if Progress encodes the text file containing the TM
character using the Unicode UTF-8 encoding, but does not put a "Byte
Order Mark" (BOM) at the beginning of the file. (see
http://en.wikipedia.org/wiki/Byte-order_mark for further information on BOM)

In a UTF-8 file, the BOM consists of 3 octets ("bytes") with codes
239
187
191

You could use the following macro to see what is in the first three
bytes in /your/ file:

Sub show3octets()
' (no error checking yet)
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your data source file here
Const strInputPath As String = "c:\myfiles\myinput.txt"

Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
MsgBox "The first three characters are " & _
CStr(Asc(c1)) & ", " & _
CStr(Asc(c2)) & " and " & _
CStr(Asc(c3)) & "."
Close 1

End Sub

If there is no BOM, you could convert your file to a new file with a BOM
using the following code. However, you should only do this if the file
is definitely encoded as UTF-8 (sorry, I don't have code to check that
here!)

Sub insertBOM()
' (no error checking yet)
Dim c As String * 1
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your input data file here
Const strInputPath As String = "c:\myfiles\myinput.txt"
' Put the pathname of your output data file here
Const strOutputPath As String = "c:\myfiles\myoutput.txt"

' Let's at least check that there is no BOM
Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
If Asc(c1) = 239 And Asc(c2) = 187 And Asc(c3) = 191 Then
MsgBox "Already contains a Byte Order Mark?"
Else
Open strOutputPath For Binary As 2
c = Chr(239)
Put 2, , c
c = Chr(187)
Put 2, , c
c = Chr(191)
Put 2, , c
Put 2, , c1
Put 2, , c2
Put 2, , c3
Get 1, , c
While Not EOF(1)
Put 2, , c
Get 1, , c
Wend
Close 2
End If
Close 1

End Sub

It is possible that Progress is using some other encoding such as a
16-bit Unicode encoding, but judging from your experience so far it is
likely to be UTF-8.

That's about the best I can do without actually inspecting your data
source file.

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/10/2009 05:08, cocciastella wrote:
How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the txt
datasource to rtf format and then inserting into word doc so the datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to change
the code page? How is that be done?

Thank you

Thanks!




.

  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How do I get symbols to display in mail merge

Hi Doug,

Where did the "Progress" come from?


Cocciastella's reply to your earlier other post.

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/10/2009 10:03, Doug Robbins - Word MVP wrote:
Hi Peter,

Where did the "Progress" come from?

  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How do I get symbols to display in mail merge

Going via RTF is certainly one way around this problem.

Also
the text file has to have a font that will display the charactes


Something to bear in mind is that "plain text files" do not really have
"a font". e.g. if you create some text in Word and use a particular font
because that allows you to see a particular character, but when you save
as plain text, no information about the font will be stored in the file.
Word /might/ pick an encoding that has a chance of encoding all the
characters that you used, but all you will end up with is a text file
that has the character encoding that you specified or Word selected. It
is possible that in some circumstances Progress decides to use a UTF-8
encoding. I have no way of knowing. However, since the macro I provided
reads the file byte-by-byte, you can adapt it to discover how exactly TM
is encoded in your text file.

Also, there is nothing in that file that declares that the file uses
this encoding or that encoding. So when a piece of software reads the
file, it typically has to deduce the encoding purely from the content
(and may perhaps use some settings - in Windows they would be in the
registry - to guide it). In other words, the software has to guess. In
many cases it may be impossible to decide between one encoding and another.

IMO it is unfortunate that "plain text files" do not contain information
about their encoding as standard. If the same text was included as a
part in a MIME-format email, for example the encoding would almost
certainly be provided in the part header.

Peter Jamieson

http://tips.pjmsn.me.uk

On 31/10/2009 07:33, cocciastella wrote:
Peter,

In discussions today we were thinking about using utf-8. Thank you for the
code so we can check it out, it's very helpful!!

The DB is Progress 8.3 and the code page is ico8859-1 which does not have
the TM, but in the UI the user can type Alt-0153 and it puts in a thick bar.
When I pull the data and write it to a text file the symbols are there. Also
the text file has to have a font that will display the charactes. I am using
Tahoma. There was a solution I found to save the text as an rtf and then
insert that into a word doc. Use the word doc as the datasourse. I cut out
the word doc and merge with the rtf file. I finally got that to work today
so I feel hopeful. I am not to great with the automation object in Progress.
On the SaveAs I can name the encoding and am using msoEncodingWestern and
word 2007 seems to like it.

Lonnie

"Peter Jamieson" wrote:

This could happen if Progress encodes the text file containing the TM
character using the Unicode UTF-8 encoding, but does not put a "Byte
Order Mark" (BOM) at the beginning of the file. (see
http://en.wikipedia.org/wiki/Byte-order_mark for further information on BOM)

In a UTF-8 file, the BOM consists of 3 octets ("bytes") with codes
239
187
191

You could use the following macro to see what is in the first three
bytes in /your/ file:

Sub show3octets()
' (no error checking yet)
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your data source file here
Const strInputPath As String = "c:\myfiles\myinput.txt"

Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
MsgBox "The first three characters are "& _
CStr(Asc(c1))& ", "& _
CStr(Asc(c2))& " and "& _
CStr(Asc(c3))& "."
Close 1

End Sub

If there is no BOM, you could convert your file to a new file with a BOM
using the following code. However, you should only do this if the file
is definitely encoded as UTF-8 (sorry, I don't have code to check that
here!)

Sub insertBOM()
' (no error checking yet)
Dim c As String * 1
Dim c1 As String * 1
Dim c2 As String * 1
Dim c3 As String * 1
' Put the pathname of your input data file here
Const strInputPath As String = "c:\myfiles\myinput.txt"
' Put the pathname of your output data file here
Const strOutputPath As String = "c:\myfiles\myoutput.txt"

' Let's at least check that there is no BOM
Open strInputPath For Binary As 1
Get 1, , c1
Get 1, , c2
Get 1, , c3
If Asc(c1) = 239 And Asc(c2) = 187 And Asc(c3) = 191 Then
MsgBox "Already contains a Byte Order Mark?"
Else
Open strOutputPath For Binary As 2
c = Chr(239)
Put 2, , c
c = Chr(187)
Put 2, , c
c = Chr(191)
Put 2, , c
Put 2, , c1
Put 2, , c2
Put 2, , c3
Get 1, , c
While Not EOF(1)
Put 2, , c
Get 1, , c
Wend
Close 2
End If
Close 1

End Sub

It is possible that Progress is using some other encoding such as a
16-bit Unicode encoding, but judging from your experience so far it is
likely to be UTF-8.

That's about the best I can do without actually inspecting your data
source file.

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/10/2009 05:08, cocciastella wrote:
How do I get symbols to display in mail merge.
The symbols are the copyright, registered tradmark and tradmark. They are
not in a specific place but could be anywhere. I have tried saving the txt
datasource to rtf format and then inserting into word doc so the datasource
is a word doc but the symbol is corrupted from the text to to the rtf. In the
text datasource it looks like:

"Report1","Subject1", ...
"xxReport","Itemxxx® description",... Which is correct.

I can't understand why word does not recognize these symbols. I get a
backwards
squiggly E. instead. I set the language to be English. Do I need to change
the code page? How is that be done?

Thank you

Thanks!




.

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
Mail merge display results barjas Mailmerge 3 July 19th 08 03:04 AM
mail merge currency symbols not working oli merge Mailmerge 1 September 26th 07 10:32 AM
display of no of pages after mail merge anand Mailmerge 1 June 16th 07 11:18 PM
How do i get job title information to display in mail merge? Ldydi525 Mailmerge 4 August 26th 06 02:21 AM
Access to Word Mail Merge; symbols change to question marks Rob S. Mailmerge 1 January 17th 05 12:25 PM


All times are GMT +1. The time now is 04:39 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"