hi richard

> The problem with some of the VBA functions is that the first and last
> parameter need to be set and the ones in the middle have no 
> meaning and
> cannot be present. This can only be achieved by using named 
> parameters. The
> GoTo method, as a function, in VBA would be ...

sooner or later everything ends up in a native c(++) function call and there
are no such things as named parameters. therefore nonpresent parameters will
be assigned a default value (iirc NULL if no explicit default value is
specified.)

so try calling

GoTo(wdGoToBookmark, NULL, NULL, "BookmarkName");

or, if it doesn't work

$empty = new VARIANT();
GoTo(wdGoToBookmark, $empty, $empty, "BookmarkName");

the difference is, that there exists two different variant types with nearly
the same meaning, VT_NULL and VT_EMPTY. PHP's NULL will be marshalled to
VT_NULL, VT_EMPTY has to be created by explicitly creating an empty variant
container in php.

ad. your previous question:
there are two other ways of importing a type library, you can either
com_load_typelib("Word.Application") which will search for the typelib
assigned to that component or you can enable com.autoregister_typelib in your
php.ini which will cause php to load the typelib for every component you
instanciate.

harald


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to