Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a way to programmatically detect whether or not NotebookLocate[{"file", "cell tag"}] has found the cell? And then if not found, stay at current selection instead of jumping to the end of the notebook?

share|improve this question

1 Answer 1

my solution (but I have limited skill) would be to first check if the tag you were looking for was in the list of the notebook's cell tags...

nb=InputNotebook[];
NotebookTools`NotebookCellTags[nb]

If not, then don't bother looking in the first place...?

So create your own "notebook locate" that checks if the tag in question is a member of the cell tag list, and if so, then call NotebookLocate

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.