The code below is not longer working since the last update:
Error: InsertBookmark. Exception: Object reference not set to an instance of an object..
$wordsApi()->insertBookmark(
new InsertBookmarkRequest(
"mydoc.docx",
new BookmarkInsert([
"start_range" => new DocumentPosition([
"node" => new NodeLink(["node_id" => "0.0.0.0"]),
"offset" => 0
]),
"end_range" => new DocumentPosition([
"node" => new NodeLink(["node_id" => "0.0.0.0"]),
"offset" => 0,
]),
"name" => "bookmark-test",
"text" => "TEST!"
]),
"my-folder
"MY-STORAGE"
));
I can get testInsertBookmarkOnline from the test cases to work without erroring - but I can’t see why I cannot insert a bookmark using the code above with the attached document:
mydoc.docx (13.6 KB)