A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Unwanted Symbols



 
 
Thread Tools Display Modes
  #1  
Old November 9th, 2007, 05:53 PM posted to microsoft.public.word.tables
sturner333
external usenet poster
 
Posts: 62
Default Unwanted Symbols

I have inserted tables into a Word document that get its data from
an Access program. The only problem I have is when data from Access that was
on multiple lines is put into a cell on the document, those square carriage
return symbols show up and characters(words) are lines up one after another
with these squares separating them:

Per Nilssonâ–¡â–¡bob smith

rather than

Per Nillson
bob smith

How do I get rid of those?
Thanks for the help!

  #2  
Old November 9th, 2007, 09:23 PM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Unwanted Symbols

Select an instance of the square boxes and use Ctrl+C to copy them to the
clip board and then with the EditReplace dialog open, use Ctrl+V to paste
them into the Find what control and in the Replace with Control, enter ^p
and then click on Replace all.

--
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

"sturner333" wrote in message
...
I have inserted tables into a Word document that get its data from
an Access program. The only problem I have is when data from Access that
was
on multiple lines is put into a cell on the document, those square
carriage
return symbols show up and characters(words) are lines up one after
another
with these squares separating them:

Per Nilsson??bob smith

rather than

Per Nillson
bob smith

How do I get rid of those?
Thanks for the help!



  #3  
Old November 9th, 2007, 11:11 PM posted to microsoft.public.word.tables
sturner333
external usenet poster
 
Posts: 62
Default Unwanted Symbols

I don't want the end user to have to do anything.

"Doug Robbins - Word MVP" wrote:

Select an instance of the square boxes and use Ctrl+C to copy them to the
clip board and then with the EditReplace dialog open, use Ctrl+V to paste
them into the Find what control and in the Replace with Control, enter ^p
and then click on Replace all.

--
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

"sturner333" wrote in message
...
I have inserted tables into a Word document that get its data from
an Access program. The only problem I have is when data from Access that
was
on multiple lines is put into a cell on the document, those square
carriage
return symbols show up and characters(words) are lines up one after
another
with these squares separating them:

Per Nilsson??bob smith

rather than

Per Nillson
bob smith

How do I get rid of those?
Thanks for the help!




  #4  
Old November 10th, 2007, 06:13 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Unwanted Symbols

How are you transferring the data from Access to Word?

--
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

"sturner333" wrote in message
...
I don't want the end user to have to do anything.

"Doug Robbins - Word MVP" wrote:

Select an instance of the square boxes and use Ctrl+C to copy them to the
clip board and then with the EditReplace dialog open, use Ctrl+V to
paste
them into the Find what control and in the Replace with Control, enter ^p
and then click on Replace all.

--
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

"sturner333" wrote in message
...
I have inserted tables into a Word document that get its data from
an Access program. The only problem I have is when data from Access
that
was
on multiple lines is put into a cell on the document, those square
carriage
return symbols show up and characters(words) are lines up one after
another
with these squares separating them:

Per Nilsson??bob smith

rather than

Per Nillson
bob smith

How do I get rid of those?
Thanks for the help!






  #5  
Old November 10th, 2007, 01:59 PM posted to microsoft.public.word.tables
sturner333
external usenet poster
 
Posts: 62
Default Unwanted Symbols

like this:
Private Sub cmdPrint_Click()
'Print customer slip for current customer.
Dim appWord As Word.Application
Dim doc As Word.Document
'Avoid error 429, when Word isn't open.
On Error Resume Next
Err.Clear
'Set appWord object variable to running instance of Word.
Set appWord = GetObject(, "Word.Application")
If Err.Number 0 Then
'If Word isn't open, create a new instance of Word.
Set appWord = New Word.Application
End If
Set doc = appWord.Documents.Open("C:\WordForms\CustomerSlip. doc", , True)
With doc
..FormFields("fldCustomerID").Result = Me!CustomerID
..FormFields("fldCompanyName").Result = Me!CompanyName
..FormFields("fldContactName").Result = Me!ContactName
..FormFields("fldContactTitle").Result = Me!ContactTitle
..FormFields("fldAddress").Result = Me!Address
..FormFields("fldCity").Result = Me!City
..FormFields("fldRegion").Result = Me!Region
..FormFields("fldPostalCode").Result = Me!PostalCode
..FormFields("fldCountry").Result = Me!Country
..FormFields("fldPhone").Result = Me!Phone
..FormFields("fldFax").Result = Me!Fax
..Visible = True
..Activate
End With
Set doc = Nothing
Set appWord = Nothing
Exit Sub
errHandler:
MsgBox Err.Number & ": " & Err.Description
End Sub


Thanks




"Doug Robbins - Word MVP" wrote:

How are you transferring the data from Access to Word?

--
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

"sturner333" wrote in message
...
I don't want the end user to have to do anything.

"Doug Robbins - Word MVP" wrote:

Select an instance of the square boxes and use Ctrl+C to copy them to the
clip board and then with the EditReplace dialog open, use Ctrl+V to
paste
them into the Find what control and in the Replace with Control, enter ^p
and then click on Replace all.

--
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

"sturner333" wrote in message
...
I have inserted tables into a Word document that get its data from
an Access program. The only problem I have is when data from Access
that
was
on multiple lines is put into a cell on the document, those square
carriage
return symbols show up and characters(words) are lines up one after
another
with these squares separating them:

Per Nilsson??bob smith

rather than

Per Nillson
bob smith

How do I get rid of those?
Thanks for the help!







  #6  
Old November 10th, 2007, 10:44 PM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Unwanted Symbols

Use the Replace function to replace the Asc(10) characters (the square
boxes) with Asc(13) (Carriage Return)

..FormFields("fldContactName").Result = Replace( Me!ContactName, Chr(10),
Chr(13))

If you have are now getting two square boxes, then you will probably need

..FormFields("fldContactName").Result = Replace( Me!ContactName,
Chr(10)Chr(10), Chr(13))


--
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

"sturner333" wrote in message
...
like this:
Private Sub cmdPrint_Click()
'Print customer slip for current customer.
Dim appWord As Word.Application
Dim doc As Word.Document
'Avoid error 429, when Word isn't open.
On Error Resume Next
Err.Clear
'Set appWord object variable to running instance of Word.
Set appWord = GetObject(, "Word.Application")
If Err.Number 0 Then
'If Word isn't open, create a new instance of Word.
Set appWord = New Word.Application
End If
Set doc = appWord.Documents.Open("C:\WordForms\CustomerSlip. doc", , True)
With doc
.FormFields("fldCustomerID").Result = Me!CustomerID
.FormFields("fldCompanyName").Result = Me!CompanyName
.FormFields("fldContactName").Result = Me!ContactName
.FormFields("fldContactTitle").Result = Me!ContactTitle
.FormFields("fldAddress").Result = Me!Address
.FormFields("fldCity").Result = Me!City
.FormFields("fldRegion").Result = Me!Region
.FormFields("fldPostalCode").Result = Me!PostalCode
.FormFields("fldCountry").Result = Me!Country
.FormFields("fldPhone").Result = Me!Phone
.FormFields("fldFax").Result = Me!Fax
.Visible = True
.Activate
End With
Set doc = Nothing
Set appWord = Nothing
Exit Sub
errHandler:
MsgBox Err.Number & ": " & Err.Description
End Sub


Thanks




"Doug Robbins - Word MVP" wrote:

How are you transferring the data from Access to Word?

--
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

"sturner333" wrote in message
...
I don't want the end user to have to do anything.

"Doug Robbins - Word MVP" wrote:

Select an instance of the square boxes and use Ctrl+C to copy them to
the
clip board and then with the EditReplace dialog open, use Ctrl+V to
paste
them into the Find what control and in the Replace with Control, enter
^p
and then click on Replace all.

--
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

"sturner333" wrote in message
...
I have inserted tables into a Word document that get its data from
an Access program. The only problem I have is when data from Access
that
was
on multiple lines is put into a cell on the document, those square
carriage
return symbols show up and characters(words) are lines up one after
another
with these squares separating them:

Per Nilsson??bob smith

rather than

Per Nillson
bob smith

How do I get rid of those?
Thanks for the help!









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.