 From 1812 to 1824, he served as Private Secretary to Henry Dundas, 1st Viscount Melville (1742-1811), who was First Lord of the Admiralty, and then served as Victualling Commissioner in the British Royal Navy.He served as the Permanent Under-Secretaries of State for the Colonies from 1825 to 1836.However, James Stephen (1789-1859) is credited with doing much of the work.