Posted by: Stephen Wells
Hi Guys,
I need a bit of help with the function call Hyperlinks.Add from the Word
11 apl. So far I have the code below, but nothing happens. I think it is
to do with the first parameter, I do not know what type of object it is
expecting.
The foHyperlink return parameter has null values for
foHyperlink.GetAddress etc. so i think something is wrong with the
parameters. I have tried fvStringNull in place of the fvOptional.
-------------------------------------------
Call oRange.Collapse( vCollapseStart )
Call fvStringNull.SetString( '' )
Call fvOptional.MakeOptional( )
Call fvTextToDisplay.SetString( 'Hi THere' )
Call fvAddress.SetString( "http://google.com.au" )
Call foHyperlinks.Add( oRange, fvAddress, fvOptional, fvOptional,
fvTextToDisplay, fvOptional, foHyperlink )
-----------------------------------------------
Parameters are:
FunctionalVar: Anchor
Class: Object
FunctionalVar: Address
Class: Variant
FunctionalVar: SubAddress
Class: Variant
FunctionalVar: ScreenTip
Class: Variant
FunctionalVar: TextToDisplay
Class: Variant
FunctionalVar: Target
Class: Variant
FunctionalVar: returnValue
Class: Word_Hyperlink
--------------------------------------------
Windows XP, Word 2003, TD 2005.1