|
-
Nov 20th, 2000, 04:45 AM
#1
Hello,
I have a tiny problem.
I'm merging clientadresses from a database into word.
There's no problem until Word-document becomes Visible.
Only the last field is visible.
I need to insert a pagebreak or a space between the fields, but i don't know how to do that.
Can anyone help me?
I have inserted the code so it is a litlle bit more clear.
Dim myWrd As Word.Document
Dim myMerge As Word.MailMerge
Dim AppWord As Word.Application
Set AppWord = New Word.Application
Set myWrd = AppWord.Documents.Add
Set myMerge = myWrd.MailMerge
With myMerge
.Application.Visible = True
.OpenDataSource Name:=Replace(Get_ReportAdres, "Project BH\CrystalReports", "Databases\Boekhouden.mdb"), Connection:=gConn, SQLStatement:="SELECT Naam, Straat, PostCode, Gemeente FROM AfdLijsten"
.Fields.Add Range:=myWrd.Range, Name:="Naam"
'space or break?
.Fields.Add Range:=myWrd.Range, Name:="Straat"
'space or break?
.Fields.Add Range:=myWrd.Range, Name:="PostCode"
'space or break?
.Fields.Add Range:=myWrd.Range, Name:="Gemeente"
'space or break?
.Execute
myWrd.Close wdDoNotSaveChanges
End With
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|