Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Hyperlinks

- - - - -

  • Please log in to reply
3 replies to this topic

#1
btran007

btran007
  • Member
  • 4 posts
  • Joined 05-June 07
Hello Everyone,

I need your expertise. I can't seem to find anything on this subject. I want to open a hyperlink that corresponds to a Table of Content. This is the code when "Toggle Field Codes":

{HYPERLINK "C:\\Content_of_Inconsistencies.doc" \l "_Toc168799624"}


I want to use coding to open up that hyperlink. I have....

ActiveDocument.FollowHyperlink Address:="'file:C:\\Content_of_Inconsistencies.doc'" & " \l" & "'_Toc168799624'"


But it's not working. Can someone point me to the right direction?

Thank you in advance
btran


How to remove advertisement from MSFN

#2
btran007

btran007
  • Member
  • 4 posts
  • Joined 05-June 07
Hello Everyone,

Does anyone have a clue at what I am talking about? Maybe I am not explaining it correctly. What I am looking for doesn't have to be a HYPERLINK, but any "JUMP" action. I just want to able to go to certain area of a WORD document using code, ie Bookmark.

Please provide some assistance.

btran

#3
spacesurfer

spacesurfer

    Pharmassist

  • Patrons
  • 1,668 posts
  • Joined 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag
Word has built-in Table of Content and indexing functionality. You can't use hyperlinks for TOC and indexes. Use Words TOC: File --> Insert --> Reference --> Index and Tables.

Read the help file for specifics.
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#4
btran007

btran007
  • Member
  • 4 posts
  • Joined 05-June 07
First of all, I have a word document opened with Table of Contents in Frame. In the Table of Contents in Frame, I have inserted checkboxes next to each hyperlink. I wasn't able to jump to the hyperlinks using code therefore I am trying Bookmarks. Below is the Macro for a checkbox but it's not working because the bookmark only exists in the main document and not in the frame. Attached is a screen capture of what I am trying to achieve. If I can define what frame the bookmarks belong to might work. I would appreciate any comments or assistance.


Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
ActiveDocument.Bookmarks("BM1").Select
End If
End Sub

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users