<< Click to Display Table of Contents >> Path- and File Names in Templates |
When a template file is created with dycodoc, the paths to pictures and external RTF files are stored relative to the position of the template file itself.
Example 1:
You create test.dcd and therefore test.tpl in "c:\templates\test.tpl". Within the document you have placed a picture object from the location "c:\templates\logo.bmp". In this case dycodoc will make the path relative to the location of the template, and therefore the path- and file name will be "logo.bmp", since the file logo.bmp is in the same directory as test.tpl.
Example 2:
You create test.dcd and therefore test.tpl in "c:\templates\test.tpl". Within the document you have placed a picture object from the location "c:\templates\images\logo.bmp".
In this case the relative path- and file name will be "images\logo.bmp".
Of course dycodoc can not create a relative path, if a referenced image (or external RTF file) is located on a different drive or on a different server than the template.
As a template is loaded into VPE using LoadTemplate(), the relative path name is converted back to an absolute path, with the position of the template file as reference point. So if the template "c:\templates\test.tpl" from the above example #2 was copied to "f:\programs\templates\test.tpl", the path name for the image will be expanded to "f:\programs\templates\images\logo.bmp".
In order to be able to transport template files from one location to another, especially in client-server environments, we recommend to keep external files on the same drive or server as the template and to use UNC (Universal Naming Code) for LoadTemplate() as well as for pictures and external RTF files used within templates. UNC is a naming convention for files which provides a machine-independent means of locating the file. A UNC name will usually include a reference to a shared folder and file name accessible over a network rather than specifying a drive letter and path. For example, to access an image named logo.bmp on a shared directory named Samples on the computer called MyWorkstation, you could use the UNC name \\MyWorkstation\Samples\logo.bmp.
NOTE: | If you enter in dycodoc a relative path for a picture or external RTF file, it will be stored unchanged in the template, e.g. "..\images\logo.bmp" or "images\logo.bmp". |