Is there any way to duplicate a bookmark? I tried with the following code:
CString csTitle = bMove.get_Title();
CString csObject = bMove.get_Object();
LPDISPATCH lpNew = NULL;
int iPlace = bNewParent.get_Count();
bNewParent.InsertChild(iPlace, csTitle, csObject, &lpNew);
CacBookmark bNew = lpNew;
But csObject is always blank for the bookmarks when I open a document. Obviously the information about where the bookmark points to is in there somewhere, since you can navigate to it correctly. How do I get at it?
Ben Dilts
Duplicating bookmark?
Hello,
The csObject is returning an empty string because the bookmark is not pointing an object.
The bookmark will point by default to the object referenced in the ‘Object’ parameter. If ‘Object’ is empty, the bookmark points to the first selected object, if no object is selected, it will point to the top of the current page.
In the code snippet below the child bookmark will point the "acPic" picture object on the page.
.InsertChild(iPlace, cs, "acPic", &lpNew);
Hope this helps?
The csObject is returning an empty string because the bookmark is not pointing an object.
The bookmark will point by default to the object referenced in the ‘Object’ parameter. If ‘Object’ is empty, the bookmark points to the first selected object, if no object is selected, it will point to the top of the current page.
In the code snippet below the child bookmark will point the "acPic" picture object on the page.
.InsertChild(iPlace, cs, "acPic", &lpNew);
Hope this helps?
I am not trying to create a bookmark to point at some known object! I have a bookmark, and I want to know what object it points at. Failing that, I want to know what page it is on.
For instance, if I open the developer manual for the PDF Creator in Adobe Acrobat and click on the second bookmark ("Acknowledgements"), the view of the PDF document is moved so that the title "Acknowledgements" is at the very top of the screen (the PDF Creator makes Acknowledgements visible somewhere on the screen). Now, if I open that document in the PDFCreactiveX control and query that bookmark for what object it points at, I get an empty string.
I want to know what an arbitrary bookmark points at.
Ben Dilts
For instance, if I open the developer manual for the PDF Creator in Adobe Acrobat and click on the second bookmark ("Acknowledgements"), the view of the PDF document is moved so that the title "Acknowledgements" is at the very top of the screen (the PDF Creator makes Acknowledgements visible somewhere on the screen). Now, if I open that document in the PDFCreactiveX control and query that bookmark for what object it points at, I get an empty string.
I want to know what an arbitrary bookmark points at.
Ben Dilts
Hello,
I believe that you are getting the empty string because the document you are trying to view is saved in view only mode, and thus the objects names are not stored in the document.
I suggest that you try with a document that you create yourself and save in view and design mode.
Hope this helps.
I believe that you are getting the empty string because the document you are trying to view is saved in view only mode, and thus the objects names are not stored in the document.
I suggest that you try with a document that you create yourself and save in view and design mode.
Hope this helps.