The dispatcher makes only use of gui command urls, that is the commands sent by menu items, tool bar buttons and so on.This way, inserting images is always done at the view cursor position.For your code to work, you need either:- to move the view cursor instead of the api text cursor ;- to use the uno api instead of the dispatcher.