Not Mail Merge But Complete Export

skea

Registered User.
Local time
Today, 17:01
Joined
Dec 21, 2004
Messages
342
Hope Some One Benefits From This.I took alot of time trying to make this up because i have searched and i found Nothing Related("Not Mail Merges").
I have a module which creates a table in word and exports my report data in each cell. The problem am having is that
1) when i create the table using RecordCount, my first Record doesnt show.
Yet When I use a fixed Figure like 7, all my records Show. I comented Out
the Code For RecordCount, try using it and see the problem.

I posted this because for Reasons Beyond My Control, i want my reports in Word.

Attached Is The Database. Take a Look
 

Attachments

Last edited:
Dont Pass Me By! Any Gurus Out Here!!
 
You have not populated the recordset object, hence it's initial count is 0.

Code:
rs.MoveLast
rs.MoveFirst
Set mytable = wordDoc.Tables.Add(wordDoc.Range(0, 0), rs.RecordCount + 1, rs.Fields.Count)
 
Great Boy. This makes me feel Stupid though.
I Think this Should Be Put In Sample Examples.

Qn2) Do you have any Idea how i can put my Records In the Middle Of the
Cells?
 
Last edited:
Code:
mytable.Cell(wRow, wCol + 1).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
 
Good Of you SJ. I have No more words.
Let Some One else Benefit From This.
 

Users who are viewing this thread

Back
Top Bottom