Technology Questions

Go Back   Technology Questions > Software Questions > General Questions > Microsoft Office

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 11-05-2009, 04:20 AM
ElsaElsa
Newsgroup Contributor
 
Posts: n/a
word print options for individual merged letters+formatting

I have set up a mail merge to merge letters into individual documents so it
would produce a long document with the merged data in it. That document will
then be split into individual documents that are named by a field in the
merged document. I would like to know how to set printing preferences for
individual documents that have been created from the merged document. Am I
correct in assuming that they will inherit the properties from the merged
documents?

also, after I have created the individual documents from the mail merge, the
formatting seems to go awol a bit . The way the script that I use works, is
that it takes the first line in the document, uses it as a document name and
then deletes the field. This shouldn't effect formatting more than by one
line. Yet, it makes the table in the document a lot bigger, thus it now takes
3 pages as opposed to 2 pages. I am guessing that it has something to do with
the table properties, is there a way of keeping the size of the original
table after using a macro to create individual files?

The script that I'm using is this:
Sub SplitMergeLetter()
' splitter Macro modified to save individual letters with

' information from data source. The filename data must be added to

' the top of the merge letter - see web article.



Selection.EndKey Unit:=wdStory
Letters = Selection.Information(wdActiveEndSectionNumber)
Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
Application.ScreenUpdating = False
With Selection

.HomeKey Unit:=wdStory
.EndKey Unit:=wdLine, Extend:=wdExtend
.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend

End With
sName = Selection
Docname = "D:\My Documents\Test\Merge\" & sName & ".doc"

ActiveDocument.Sections.First.Range.Cut
Documents.Add

'Documents are based on the Normal template

'To use an alternative template follow the link.
With Selection
.Paste
.HomeKey Unit:=wdStory
.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
.Delete
End With
ActiveDocument.SaveAs FileName:=Docname, _
FileFormat:=wdFormatDocument
ActiveWindow.Close
Counter = Counter + 1
Application.ScreenUpdating = True
Wend
End Sub

on a completely unrelated note, I have been trying to find ways to create a
global template that would save the script above in a shared network and was
wondering if anyone has any advice on this. I would be very very thankful for
any advice on these problems.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 11-05-2009, 04:20 AM
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I retain OneNote formatting & export/print/save to Word? Crystal C. Microsoft OneNote 1 01-19-2009 11:17 AM
How can I retain OneNote formatting & export/print/save to Word? Crystal C. Microsoft OneNote 1 01-19-2009 11:17 AM
How can I retain OneNote formatting & export/print/save to Word? Crystal C. Microsoft OneNote 1 12-06-2008 02:00 AM
How can I retain OneNote formatting & export/print/save to Word? Crystal C. Microsoft OneNote 1 12-05-2008 11:10 PM
Formatting Options Within Charts in MS Word? Fruzzle Microsoft Office 2 05-08-2008 11:20 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 12:15 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0