#1   Report Post  
Joe
 
Posts: n/a
Default Document Merge


I've got a customer who has been taking their Word Document transcriptions,
pushing enter four times at the top of the page, then printing them on the
pre-printed letter head in order to fax them out.
Now that they're on a centralized shared faxing system, we need to get the
previous documents merged into a letter head template I've created.
What would be the best way to automate the removal of those enter marks at
the top of the pages, while merging the doc onto the template letter head,
and saving with it's current document title in it's current document
location?
There are thousands of documents that need this done (at least five years
worth of daily patient office visit transcriptions).
Would some kind of script or macro be the way?
Can somebody point me in a direction?
Thanks in advance.
Joe


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

Running a macro with the following (untested) code may do everything for
you.

Dim MyPath As String
Dim MyFileName As String
Dim Source As Document, Target As Document, MyRange As Range

With Dialogs(wdDialogCopyFile)
If .Display() -1 Then Exit Sub
MyPath = .Directory
End With
If Len(MyPath) = 0 Then Exit Sub
If Asc(MyPath) = 34 Then
MyPath = Mid$(MyPath, 2, Len(MyPath) - 2)
End If
MyFileName = Dir$(MyPath & "*.doc")
While MyName ""
Set Source = Documents.Open(MyPath & myFile)
Set MyRange = Source.Range
MyRange.Start = MyRange.Paragraphs(5).Start
Set Target = Documents.Add("your template")
Target.Range.FormattedText = MyRange.FormattedText
Source.Close wdDoNotSaveChanges
Target.SaveAs "C:\NewFolder\" & myFile
Target.Close
MyName = Dir
Wend

I would start with just a few of the documents in a folder by themselves to
test it, and before running it, create a new folder (C:\NewFolder) for the
"new" documents to be saved into, so that they do not overwrite the
originals.

--
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
"Joe" . wrote in message ...

I've got a customer who has been taking their Word Document
transcriptions, pushing enter four times at the top of the page, then
printing them on the pre-printed letter head in order to fax them out.
Now that they're on a centralized shared faxing system, we need to get the
previous documents merged into a letter head template I've created.
What would be the best way to automate the removal of those enter marks
at the top of the pages, while merging the doc onto the template letter
head, and saving with it's current document title in it's current document
location?
There are thousands of documents that need this done (at least five years
worth of daily patient office visit transcriptions).
Would some kind of script or macro be the way?
Can somebody point me in a direction?
Thanks in advance.
Joe



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
Word Compare and Merge Document Function EricM Microsoft Word Help 2 March 28th 05 11:53 PM
How to protect the main document in a mail merge process Antonio O Mailmerge 0 February 16th 05 04:29 PM
merge data into graph in main merge document Mail Merge Mom Mailmerge 0 February 2nd 05 03:53 PM
How do I merge an excel document Pat McGlamery Tables 1 December 10th 04 03:00 AM
How do I mail merge when only merge document is shown in tools? DaveAS Microsoft Word Help 2 December 1st 04 03:45 PM


All times are GMT +1. The time now is 04:22 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"