>No, this is by design in Visual FoxPro. Whatever the session the object was created into, any call to a method from any of those objects will switch to that base session even if you force a switch just before calling that method.
>
>Thanks to Sergey for having confirmed that to me. We ended up dropping that approach. We proposed another approach to the client as a workaround.
FWIW, if this is a problem you can use MergeText() instead of ExpandTemplate to avoid using a method in an object...