@Doubtful,
In the first instance the infinitive does not work because the sentence refers to the object's ongoing action, and not to an action in general.
In the second both the infinitive and the prepositional phrase will work because the sentence refers to the telling of a general action.