View Single Post
  #5   Report Post  
Posted to microsoft.public.word.tables
sturner333 sturner333 is offline
external usenet poster
 
Posts: 5
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!