Im trying to execute the following in a matlab file :
hdlActiveX = actxserver('Word.Application');
hdlActiveX.Selection.GoTo(what, which, count, name);
in order to go to a certain place in the word document, and after it to write something in it, at the place where the bookmark is.
In the above code sample, the GoTo parameters are :
what = -1; % 'wdGoToBookmark'
which = 1; % 'wdGoToAbsolute'
count = 1;
name = 'myBookmark';
Further, even though the bookmark is available, I only get:
??? Invoke Error, Dispatch Exception:
Source: Microsoft Word
Description: The bookmark is not available.
Help File: wdmain11.chm
Help Context ID: 6005
If you could help me find the answer of the following questions:
1) (main question) how can I find out, what is exactly the problem ? i.e. how should I write the code in order to function ?
2) (minor question) where can I found, the values of the whats, and whichs (e.g. wdGotoBookmark is -1) ?
Thank you in advance,