Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

Opening Microsoft Word docs to specific page

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Opening Microsoft Word docs to specific page

    Hello

    I have used an older AMS package (v3 i think) to create an interface for a large Microsoft Word document.
    The problem I had was opening to a specific page in the document. To resolve it I broke the document down in lots of smaller documents which was a pain in the neck.

    Will the new version of AMS (5.0) allow me to open to a specific page in a .doc file? If not I noticed there is a plugin available to allow manipulation of COM objects. Would this allow me to do it? If so how hard would it be?

    Phil

  • #2
    I am not an expert with Word automation, but here is a start:

    Code:
    ms_word = luacom.CreateObject("Word.Application");
    if( not ms_word)then
    	Dialog.Message("Error","Failed to create Word Document");
    else
    	ms_word.Visible = true;
    	ms_word.Documents:Open("C:\\myDocument.doc");
    	-- Uncomment next line to close Word
    	-- ms_word:Quit();
    	ms_word = nil;
    end

    Comment


    • #3
      Thanks for the quick reply

      I will give it a go.

      Comment

      Working...
      X