+ Reply to Thread
Results 1 to 9 of 9

Opening and activating a word document

  1. #1
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Opening and activating a word document

    I want to open a word document so I can "scrape" form field information from it. The following code opens the document but apparently doesn't activate it. When the document does open, I get a dialog box asking if I want to open it as read only even though NO instances of word are running.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by dflak; 07-11-2017 at 10:13 AM.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Opening and activating a word document

    get a dialog box asking if I want to open it as read only
    Have you checked Task Manager for hidden instances of Word? Issue not apparent here...

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Opening and activating a word document

    No other instances of word are running and certainly not this document.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Opening and activating a word document

    OK - all I can suggest then is reboot. The issue seems to be local to your machine, or at least does not occur on mine (I can't speak for anyone else).

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,902

    Re: Opening and activating a word document

    I tested it, and didn't get that error.

    However, what you have in your document isn't FormFields from what I can tell. They are ContentControls.

    Try something like below. It worked for me.
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Opening and activating a word document

    A reboot did fix the read-only issue. An instance did "sneak in."

    CK76 - you get the blue ribbon. What I saw on line was formfields - maybe I created them incorrectly in the word document. I don't recall having to go to the developer ribbon to make a word form in earlier versions of Word.

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Opening and activating a word document

    I need one more piece of data. I do need to know the name of the control - which is called title. How do I find the value that is in the control? I don't see a .value like everywhere else in VB.

  8. #8
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Opening and activating a word document

    Never mind. It's ff.RANGE.text - of course, what could be more obvious?

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Opening and activating a word document

    FYI: This is the end result of the help you gave me. I really needed to knock the rust off of doing this kind of thing. https://www.excelforum.com/excel-pro...ml#post4694796

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Opening Word document and powerpoint through vba
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2017, 05:52 AM
  2. opening word document from VBA
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2009, 04:02 PM
  3. Opening Word document with Excel
    By Mr.Jones in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 01-11-2007, 10:13 AM
  4. [SOLVED] Opening a word document
    By RobH in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2006, 07:41 AM
  5. [SOLVED] Opening word document through excel vba
    By srinums in forum Excel General
    Replies: 0
    Last Post: 06-08-2006, 09:20 AM
  6. [SOLVED] opening an excel document in word
    By zoot in forum Excel General
    Replies: 4
    Last Post: 07-21-2005, 08:05 AM
  7. [SOLVED] Opening Word Document with excel
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 03-20-2005, 10:24 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1