What role does the underlined word play in the sentence below?
Leaving office, the president vowed to clear his name.
What role does the word in ( ) play in the sentence below?
Leaving (office), the president vowed to clear his name.
A direct object
An object of the participle
An indirect object
An object of the preposition