Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ms word
Message
De
02/02/1999 11:40:23
 
 
À
02/02/1999 08:22:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00182673
Message ID:
00182970
Vues:
13
>But an Address property is Read-Only (at least that's what VFP says) :(
>Mark

Yes, that is right. but you going to have to go and delete first the link and
then create a new one instead with the required change. the address info will give you the string and then modify it, pos the cursor where the link is delete it and then create the new one in top of it.. but that is the part that I am still confuse....kind of what I did here

Dim x As Integer, xx As Integer, xxx As Integer, i As Integer
Dim tempadd As String, newadd As String

x = ActiveDocument.Hyperlinks.Count <-- will give you the total links in
the document
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.TypeParagraph
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.TypeText Text:="nuber of links are " + Str(x)
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.MoveUp Unit:=wdLine, Count:=1

' Loop to replace the links..
For i = 1 To x
tempadd = ActiveDocument.Hyperlinks(i).Address
tempadd = tempadd + Trim(Str(i))
newadd = Selection.Hyperlinks(i).Address
'ActiveDocument.Hyperlink.Address = tempadd

Selection.Range.Hyperlinks(1).Delete <--- delete link
' Now create a new one instead... Kind of...
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"d:\My Documents\Job Description.doc", SubAddress:=""

some more code ...
Selection.TypeParagraph
Selection.TypeText Text:=tempadd

see if you can better this code...

but I think the basic principle is here..
sorry If I can help you more

Mark Oliva
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform