Ian keyed in on the solution here. In short - you can't have a condition around just the CFDOCUMENT starting and ending tags; the condition needs to wrap the entire code block. From what I experienced CFdocument seems to always run whether it is wrapped in a condition or not(seems to execute during pre-processing, like evaluate()), then if there is a condition that isn't met it will discard the CFdocument results. Now the end tag doesn't seem to follow these same rules (which you noticed with your error) - it behaves just like any other CF tag.
CFdocument in general is a bit flakey, but once you get it working it's an extremely useful and powerful tag. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275741 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4