$ 0 0 is there any code to check if an mxd has data driven pages activated? e.g. if datadrivenpages = true then xx else yy