<?php //path to the CreateDocx class within your PHPDocX installation require_once '../../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx->addBookmark(array('type' => 'start', 'name' => 'bookmark_name')); $docx->addText('Text that has been bookmarked.'); $docx->addBookmark(array('type' => 'end', 'name' => 'bookmark_name')); $docx->createDocx('example_addBookmark_1');