Reply
 
Thread Tools Display Modes
  #1   Report Post  
Al Christoph
 
Posts: n/a
Default "Printing" selected "reocrds" to a word document

I have a data base that contains all the information need to produce church
bulletins for the coming year. I have a word template that nicely merges
everything together. However, this is not the final product for the pews.
Others are involved.

I need to send in the merged document, and they have requested that it come
as an MS Word document.

1. How do "print" to a Word document? If I just cut and paste, the field
associations remain.

2. Is there a command to output a range of records? Right now it only does
the currently displayed record.

I'm not sure that this is exactly on topic since its not a mail merge
situation, but rather some other kind of use the data from Access in a Word
document mess. (Working Sunday by Sunday and printing the bulletins myself
this made sense and worked, but I'm not longer in the final production
game.)

Regards,
Al


  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

If the template is a mailmerge main document, execute the merge to a new
document. If you want to split that document into separate files, one for
each record in the data base, you can use either of the following methods:

' Macro created by Doug Robbins to save each letter created by a mailmerge
as a separate file.

Dim i As Long, Source as Document, Target as Document, Letter as Range
Set Source = ActiveDocument
For i = 1 to Source.Sections.Count
Set Letter = Source.Sections(i).Range
Letter.End=Letter.End-1
Set Target = Documents.Add
Target.Range=Letter
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i

If you want each file to be named based on one of the fields in the data
source,
here's a method that I have used that involves creating a separate
catalog type mailmerge maindocument which creates a word document containing
a table in each row of which would be your data from the database that you
want to use as the filename.

You first execute that mailmerge, then save that file and close it. Then
execute the mailmerge that you want to create the separate files from and
with the
result of that on the screen, run a macro containing the following code
and when the File open dialog appears, select the file containing the table
created by the first mailmerge

' Throw Away Macro created by Doug Robbins
'
Dim Source As Document, oblist As Document, DocName As Range, DocumentName
As String
Dim i As Long, doctext As Range, target As Document
Set Source = ActiveDocument
With Dialogs(wdDialogFileOpen)
.Show
End With
Set oblist = ActiveDocument
Counter = 1
For i = 1 To oblist.Tables(1).Rows.Count
Set DocName = oblist.Tables(1).Cell(i, 1).Range
DocName.End = DocName.End - 1

'Change the path in the following command to suit where you want to save
the documents.
DocumentName = "I:\WorkArea\Documentum\" & DocName.Text
Set doctext = Source.Sections(i).Range
doctext.End = doctext.End - 1
Set target = Documents.Add
target.Range.FormattedText = doctext
target.SaveAs FileName:=DocumentName
target.Close
Next i


--
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
"Al Christoph" wrote in message
...
I have a data base that contains all the information need to produce church
bulletins for the coming year. I have a word template that nicely merges
everything together. However, this is not the final product for the pews.
Others are involved.

I need to send in the merged document, and they have requested that it
come as an MS Word document.

1. How do "print" to a Word document? If I just cut and paste, the field
associations remain.

2. Is there a command to output a range of records? Right now it only does
the currently displayed record.

I'm not sure that this is exactly on topic since its not a mail merge
situation, but rather some other kind of use the data from Access in a
Word document mess. (Working Sunday by Sunday and printing the bulletins
myself this made sense and worked, but I'm not longer in the final
production game.)

Regards,
Al



  #3   Report Post  
Al Christoph
 
Posts: n/a
Default

Thanks,
You got me digging and i found exactly what I by running the wizard. Don't
think I've ever done it in the current releases.

Regards,
Al
"Doug Robbins" wrote in message
...
If the template is a mailmerge main document, execute the merge to a new
document. If you want to split that document into separate files, one for
each record in the data base, you can use either of the following methods:

' Macro created by Doug Robbins to save each letter created by a mailmerge
as a separate file.

Dim i As Long, Source as Document, Target as Document, Letter as Range
Set Source = ActiveDocument
For i = 1 to Source.Sections.Count
Set Letter = Source.Sections(i).Range
Letter.End=Letter.End-1
Set Target = Documents.Add
Target.Range=Letter
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i

If you want each file to be named based on one of the fields in the data
source,
here's a method that I have used that involves creating a separate
catalog type mailmerge maindocument which creates a word document
containing
a table in each row of which would be your data from the database that you
want to use as the filename.

You first execute that mailmerge, then save that file and close it. Then
execute the mailmerge that you want to create the separate files from and
with the
result of that on the screen, run a macro containing the following code
and when the File open dialog appears, select the file containing the
table
created by the first mailmerge

' Throw Away Macro created by Doug Robbins
'
Dim Source As Document, oblist As Document, DocName As Range, DocumentName
As String
Dim i As Long, doctext As Range, target As Document
Set Source = ActiveDocument
With Dialogs(wdDialogFileOpen)
.Show
End With
Set oblist = ActiveDocument
Counter = 1
For i = 1 To oblist.Tables(1).Rows.Count
Set DocName = oblist.Tables(1).Cell(i, 1).Range
DocName.End = DocName.End - 1

'Change the path in the following command to suit where you want to
save
the documents.
DocumentName = "I:\WorkArea\Documentum\" & DocName.Text
Set doctext = Source.Sections(i).Range
doctext.End = doctext.End - 1
Set target = Documents.Add
target.Range.FormattedText = doctext
target.SaveAs FileName:=DocumentName
target.Close
Next i


--
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
"Al Christoph" wrote in message
...
I have a data base that contains all the information need to produce
church bulletins for the coming year. I have a word template that nicely
merges everything together. However, this is not the final product for the
pews. Others are involved.

I need to send in the merged document, and they have requested that it
come as an MS Word document.

1. How do "print" to a Word document? If I just cut and paste, the field
associations remain.

2. Is there a command to output a range of records? Right now it only
does the currently displayed record.

I'm not sure that this is exactly on topic since its not a mail merge
situation, but rather some other kind of use the data from Access in a
Word document mess. (Working Sunday by Sunday and printing the bulletins
myself this made sense and worked, but I'm not longer in the final
production game.)

Regards,
Al





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
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. Rachel King Microsoft Word Help 38 August 21st 09 09:54 PM
Making Word do something that Wordperfect can do NarniaUK New Users 4 May 1st 05 10:44 PM
Locking Two Words Together to Make a Proper Compound Noun in Word WorkingWoman Microsoft Word Help 2 April 7th 05 02:33 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM
WP Delay Code - Word Equiv Mike G - Milw, WI Microsoft Word Help 6 January 10th 05 04:12 PM


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

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"