|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I'm using the following code to return an inline graphic:
Code:
return CreateResource(Field("name") + ".pdf", "graphic"); So my question is pretty simple, how do you check that the graphic file indeed exists and if not, run a different set of code? Thanks! |
#2
|
|||
|
|||
![]()
I would do this by creating a text frame set on top of a graphic frame and use this:
Code:
Pic = CreateResource(Field("name") + ".pdf", "graphic", true); if (Pic.exists){ FindTextFrame("Text").suppress = true; return Pic; } else{ FindGraphicFrame("Image").suppress = true; return CreateResource(""); } |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|