Results 1 to 2 of 2

Thread: Search text in word document with javascript

  1. #1
    Join Date
    Apr 2006
    Location
    Brisbane
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Search text in word document with javascript

    Hi All,

    I have a word document I open with the following code, what I'm trying to do is search the document for a particular piece of text "[FILE_NUMBER]" that can reside in either the header, footer or body of the document.

    doc = new ActiveXObject("Word.Application");
    doc.Visible = false;
    doc.Documents.Open("C:\\Inetpub\\wwwroot\\biz_e_asset_new\\styles\\report_templates\\service_request_template3.doc", null, true);
    var oDocument=doc.ActiveDocument;
    //At this point I'd like to search the header,footer,body
    doc.quit(0);

    Does anyone know how to retrieve these pieces of content. Any help greatly appreciated!!!

    Regards Hayden

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Does this help you:
    http://www.dynamicdrive.com/dynamicindex11/findpage.htm.
    I hope it does,
    Nile
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •