No doubt on his father's account, Vernon took the young Gregg into his service as his secretary, but had to dismiss him 'for his ill qualities', according to Gilbert Burnet.
Nevertheless, when Robert Harley became secretary of state in 1706, he appointed Gregg to an underclerkship in his office, and even extended to him an exceptional amount of confidence.
The Whig leaders, however, were eager to obtain evidence against Harley, and were in great hopes that the unfortunate man would say something to convict his chief of complicity.
At length, they sent Queen Anne a recommendation that the execution should take place, bitterly disappointed at making no other discovery than that the business of the secretary's office was conducted in a strangely lax manner.
Harley found it necessary during the second week in February 1708 to resign his secretaryship, but he had the generosity to allow Gregg's widow a pension of fifty pounds annually out of his private purse.