Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word 97: Macro to print hyperlinked documents?

    Looking for tips on creating a macro in Word97 that will print all of the documents hyperlinked to from the active document -- preferably without having to open them first.

    I'm thinking of a For Each ... Next loop - but haven't found out if Hyperlinks can be referenced as a collection....

    Any pointers or previous postings are appreciated!

    Thanks!
    Tracey Morris

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word 97: Macro to print hyperlinked documents?

    I think it's a bit dangerous to be printing out documents without looking at them, but it is possible, at least in Word2000:

    Sub LinkPrint()
    Dim aLink As Hyperlink, docTemp As Document
    For Each aLink In ActiveDocument.Hyperlinks
    Set docTemp = Documents.Open(FileName:=aLink.Address, _
    ConfirmConversions:=False, Visible:=False)
    docTemp.PrintOut
    docTemp.Close wdDoNotSaveChanges
    Set docTemp = Nothing
    Next
    End Sub

    When I tried this on a link to a .asp page, the printout was quite funky. Hope this helps.

  3. #3
    kzytv4
    Guest

    Re: Word 97: Macro to print hyperlinked documents?

    Thanks for the input!

    I was a bit rushed & forgot to mention the main doc is basically a Table of Contents to other Word documents -- a list of procedures where each procedure has its own separate file.

    Most people would only use the TOC to link to the appropriate procedure & then print it - but they may also want to print the entire procedure set.

    It looks like what you posted is just what I need - I'll try the code out later today & see if I come up with anything else.

    Thanks so much!
    Tracey Morris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •