Hi all,
I was hoping someone would be able to help me out or point me in the right direction.
I've got a word document that contains 200+ letters (i.e 200 pages).
I'm wanting to save these 200 pages seperately in PDF format to a set directory (i.e desktop\letters)
I also want the code to name the file based on a line within the letter.
My current process is:
File > Print > select Current page > Adobe PDF > Type File Name> Print to folder on desktop.
Obviously this takes absolutely ages
I've attached the below as a vauge example of what i'm trying to acheive.
Please Please Help![]()
Can you mail merge to the PDF printer? I'm assuming you have Adobe or some other pdf Distiller.
Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
John Wright
I've tried that but it just puts the 200+ letters into 1 PDF document rather than 200 seperate letters.
So i've found this, but i don't even know where to start with changing it so that the doc name is a merge field I set - (I'm more of an excel vba guy, word is completely new to me!)Sub Splitter() ' Based on a Macro created 16-08-98 by Doug Robbins to save each letter created by a ' mailmerge as a separate file. Dim Mask As String Dim Letters As Long Dim Counter As Long Dim DocName As String Dim oDoc As Document Dim oNewDoc As Document Set oDoc = ActiveDocument oDoc.Save Selection.EndKey Unit:=wdStory Letters = Selection.Information(wdActiveEndSectionNumber) Mask = "ddMMyy" Selection.HomeKey Unit:=wdStory Counter = 1 While Counter < Letters DocName = "D:\My Documents\Temp\Workgroup\" & Format(Date, Mask) _ & " " & LTrim$(Str$(Counter)) & ".doc" oDoc.Sections.First.Range.Cut Set oNewDoc = Documents.add 'Documents are based on the Normal template 'To use an alternative template follow the link. With Selection .Paste .EndKey Unit:=wdStory .MoveLeft Unit:=wdCharacter, Count:=1 .Delete Unit:=wdCharacter, Count:=1 End With oNewDoc.SaveAs FileName:=DocName, _ FileFormat:=wdFormatDocument, _ AddToRecentFiles:=False ActiveWindow.Close Counter = Counter + 1 Wend oDoc.Close wdDoNotSaveChanges End Sub
Are you trying to print each page of one doc to different people? I guess someone here could help you write a macro or something to do that, but....
Typically you would create a single template letter...enter info for each receipent in a list....then mail merge would customize each letter to each person. Then you would have 200 people with individual letters addressed to each of them and with personalized greetings, etc.
EDIT: whoops, you have posted some code while I was typing...I'm too new to VBA to be of much help...even newer to Word.
Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
John Wright
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks