Thanks Sergey,
I'll try it.
Allen
>>Hi,
>>I've searched but have been unable to find anyone to come up with the solution to get the path and file name of the linked file in a general field.
>>
>>If I double click on the general field in a browse window, the Edit menu bar will show a Link... option which will show the info. But how can I get this programmatically? Are there any API calls I can use?
>>
>>Help.
>>Thanks,
>>Allen
>
>Hi Allen,
>Below you'll find function I just created. It returns the name of linked file from a general field. I tested it on Word documents and it's worked fine.
>
>
FUNCTION GetLinkedFileName
>LOCAL loContObj
>loContObj = Createobject("gfnamecontainer")
>loContObj.Addobject("getgfname", "getgfname")
>* 'gf' is the name of general field
>loContObj.GetGfName.Controlsource = "gf"
>
>RETURN loContObj.GetGfName.Documentfile
>*
>DEFINE CLASS getgfname AS oleboundcontrol
> Name = "Oleboundcontrol1"
>ENDDEFINE
>
>DEFINE CLASS gfnamecontainer AS form
> Name = "gfnamecontainer"
>ENDDEFINE
>
>