ActiveX command to add a page/file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm accessing Word from MATLAB via ActiveX-commands. A document is opened
and now, I want to add another doc.-file (only one page) at the end of the
opened document. Does anyone know which command to use?

These are the commands I use so far in MATLAB, they open an activeX
connection and set the selection point to the document's end:

word = actxserver('Word.Application');
end_of_doc = get(word.activedocument.content,'end');
set(word.application.selection,'Start',end_of_doc);
set(word.application.selection,'End',end_of_doc);

Thanks for any help or comments,

Cannabibal
 
G'day "Cannabibal" <[email protected]>,

Depends on exactly what you mean. I would use the InsertFile method to
insert an actual file at the end. You may also want to TypeText
CHR$(12) before to add in a hard page break.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Cannabibal reckoned:
 
G'day "Cannabibal" <[email protected]>,

They both hang off the Selection object because the default property
of Selection is its Range and it provides a wrapper to many range
functions.

I am not ofay enough with activex scripting to get more specific for a
code sample I'm afraid.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Cannabibal reckoned:
 
Back
Top