Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Printing Doc Sections to PDF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dylan - 31 Mar 2008 14:53 GMT
Hi, I'm using the following macro to print a mailmerged document's sections
to PDF Files.

How do I call a text value from each section, e.g. the 65th word (the last
word on the fifth row of the table) and depending whether i = an Odd or Even
number call the document "Report" or "Appendix A" respectively?

So that the filename is something like "11125 Report.PDF", or "11125
Appendix A.PDF"

Sub PrintSections()

Dim i As Long
For i = 1 To ActiveDocument.Sections.Count
   ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" &
i, _
   OutputFileName:=(i & ".jpg")
Next i

End Sub

Thank you
DDawson
Dylan - 31 Mar 2008 15:08 GMT
Can you please tell me why I can't open the PDFs outputted from this macro.

Sub PrintSections()

Dim i As Long
For i = 1 To ActiveDocument.Sections.Count
    ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" &
i, _
    OutputFileName:=(i & ".pdf")
Next i

End Sub

> Hi, I'm using the following macro to print a mailmerged document's sections
> to PDF Files.
[quoted text clipped - 19 lines]
> Thank you
> DDawson
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.