Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the linked path&file in a general field
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00491987
Message ID:
00493688
Views:
21
>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform