Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2011, 05:46 AM
Splint Splint is offline TOC links to images in document? Windows XP TOC links to images in document? Office 2010 32bit
Novice
TOC links to images in document?
 
Join Date: Nov 2011
Posts: 7
Splint is on a distinguished road
Default TOC links to images in document?

Hi,



I have a document which is made up of one image per page and I want to have a table of contents which is linked to the appropriate image. I would also like to have a link on each page which leads back to the TOC.

The only text in this document is the TOC and the links on each page back to the TOC.

Thanks
Reply With Quote
  #2  
Old 11-05-2011, 06:30 AM
macropod's Avatar
macropod macropod is offline TOC links to images in document? Windows 7 64bit TOC links to images in document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Splint,

Without some text to link to, your TOC will be a meaningless set of page numbers.

If you have, say, a title for each image, apply the 'Heading 1' paragraph Style to the paragraphs concerned, then insert a TOC field. That will allow you to click on a TOC entry and go to the relevant title. And, if you add the forward & back link buttons to the QAT, you'll be able to use those for going back & forth between the TOC and the titles.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-05-2011, 07:03 AM
Splint Splint is offline TOC links to images in document? Windows XP TOC links to images in document? Office 2010 32bit
Novice
TOC links to images in document?
 
Join Date: Nov 2011
Posts: 7
Splint is on a distinguished road
Default

Thanks Paul,

I suspect what might be the easiest work around in for this particular document is to just have the subject title for the images in the TOC and just use the page selector when the document is in PDF format. It doesn't need to be overly professional, mainly functional.

Cheers
Splint
Reply With Quote
  #4  
Old 11-06-2011, 05:50 AM
macropod's Avatar
macropod macropod is offline TOC links to images in document? Windows 7 64bit TOC links to images in document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Splint,

FWIW, here's a macro, based on one I developed for https://www.msofficeforums.com/drawi...ument-all.html.

This version inserts all the jpg files in a folder into a Word document, with the pic names in the 'Heading 1' Style. If you:
• add a TOC field to the document, then run the macro; or
• run the macro, then add a TOC field to the document,
you'll have entries pointing to each pic by name. You may want to modify the document's Heading 1 Style to have no numbering and to start on a new page. As coded, all images are scaled to 6in wide.
Code:
Sub AddPics()
Application.ScreenUpdating = False
Dim strFolder As String, strPic As String, Rng As Range, iShp As InlineShape
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strPic = Dir(strFolder & "\*.jpg", vbNormal)
With ActiveDocument
  While strPic <> ""
    Set Rng = .Range.Characters.Last
    With Rng
      .InsertAfter Split(strPic, ".")(0) & vbCr & vbCr
      .Paragraphs.First.Style = "Heading 1"
    End With
    Set iShp = .InlineShapes.AddPicture(FileName:=strFolder & "\" & strPic, _
      LinkToFile:=False, SaveWithDocument:=True, Range:=Rng.Characters.Last.Previous)
    With iShp
      .LockAspectRatio = True
      .Width = InchesToPoints(6)
    End With
    strPic = Dir()
  Wend
  .Fields.Update
End With
Set Rng = Nothing: Set iShp = Nothing
Application.ScreenUpdating = True
End Sub
 
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]

Last edited by macropod; 11-07-2011 at 04:09 AM.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
TOC links to images in document? Need to make sure all images are 300+ dpi in word document Ralph Drawing and Graphics 3 08-20-2011 03:57 AM
hiding images in word document gib65 Drawing and Graphics 3 08-17-2011 11:09 AM
TOC links to images in document? editing of images, tables and caption in the whole document. Jamal NUMAN Word 4 07-08-2011 04:14 AM
TOC links to images in document? Hypertext links within document? (not to a website) cosiyak Word 1 05-22-2011 01:26 PM
Remove all images from a Mac OS X Word 2008 Document? qcom Drawing and Graphics 0 04-23-2011 06:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft