>>#DEFINE NumberOfPagesToInsert AcroExchInsertPDDoc.GetNumPages()
>Appreciate you showing this. Can VFP procedures (methods) also be called? Can parameters be passed? I know - an apogee of sloth.
>Thanks
>Terry
#DEFINE's are string translations that take place at compile-time not run-time. That is, when PRG's etc. are converted into FXP's or EXE's etc.
A #DEFINE can contain
almost anything. I often use them to make code self documenting, here is a
simplified example
#DEFINE Sunday 1
#DEFINE Saturday 7
#DEFINE IsAWeekend INLIST( iDayOfWeek, Saturday, Sunday )
iDayOfWeek = DOW( dCurrent )
IF NOT (IsAWeekend) THEN
ENDIF
Admitedly, in this contrived example, one could argue that readability has suffered because it is no longer obvious that iDayOfWeek is part of the test. But in real life, typically the data being tested is obvious and the expressions much more complex.
Hope this helps.
censored.