Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Worsty Worsty is offline
external usenet poster
 
Posts: 3
Default Print associated document hyperlinks

I have a word document that has hyperlinks in it. When I print it I
would like it to also print all associated hyperlink documents. Is
this possible using VBA?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Print associated document hyperlinks

Assuming the hyperlinks you want to print are hyperlinks to other word
documents (*.doc) then

Sub PrintDocAndHyperlinkedDocs()
Dim iFld As Integer
Dim sHlink As String
Dim oLinkDoc As Document
'ActiveDocument.PrintOut
For iFld = 1 To ActiveDocument.Fields.Count
With ActiveDocument.Fields(iFld)
sHlink = .Code.Text
If InStr(1, sHlink, "doc""") Then
sHlink = Replace(sHlink, "HYPERLINK ", _
"")
Set oLinkDoc = Documents.Open(sHlink)
oLinkDoc.PrintOut
oLinkDoc.Close wdDoNotSaveChanges
End If
End With
Next iFld
End Sub

should do the trick http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Worsty wrote:
I have a word document that has hyperlinks in it. When I print it I
would like it to also print all associated hyperlink documents. Is
this possible using VBA?



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
print hyperlinks Crios Microsoft Word Help 1 February 16th 09 07:27 AM
Hyperlinks in Print Layout Barrie Microsoft Word Help 2 May 14th 08 06:23 PM
Print to PDF loses hyperlinks Fatfreek Microsoft Word Help 5 June 15th 07 03:46 PM
When I print a Word document to pdf, the hyperlinks show up Pat S. New Users 3 October 15th 06 07:31 AM
How do I print a list of hyperlinks in a MS Word document? Tracy Microsoft Word Help 1 May 20th 06 06:40 PM


All times are GMT +1. The time now is 05:47 PM.

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

About Us

"It's about Microsoft Word"