+ Reply to Thread
Results 1 to 4 of 4

export cell contents to Word fields in a protected Word document

  1. #1
    Valued Forum Contributor
    Join Date
    04-11-2006
    MS-Off Ver
    2007
    Posts
    438

    export cell contents to Word fields in a protected Word document

    Hello all,

    Is it possible to export Excel cell contents to Word fields in a protected Word document?

    For example...

    What code would be needed to tell Excel to open up, copy and export the contents of A2 in the active sheet of a workbook to "Field 2" in a Word document named "Report 01" and then put the contents of B2 to "Field 2" etc?

    Do both applications have to be opened up at the same time or is Excel able to open up Word on its own?

    Will the macro be able to....

    1. Automatically open up the correct Word document?

    2. Look ONLY in a certain folder for the "Report 01" Word document?

    or

    Bring up a "selection" box that allows you to select the document you wish Excel to export it's data to?

    3. Close and save the Word Document without any user intervention?

    thanks,

    duugg
    Last edited by duugg; 07-07-2009 at 04:16 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388

    Re: export cell contents to Word fields in a protected Word document

    The code below covers the basic requirement.

    Set a reference to the Word 11.0 object library (Tools, References)
    Please Login or Register  to view this content.
    For document selection, look at the GetOpenFilename Method and the FileDialog object, both in VB help with examples.

  3. #3
    Valued Forum Contributor
    Join Date
    04-11-2006
    MS-Off Ver
    2007
    Posts
    438

    Re: export cell contents to Word fields in a protected Word document

    Thanks T-J!

    I will try that

  4. #4
    Registered User
    Join Date
    03-31-2011
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: export cell contents to Word fields in a protected Word document

    Is there a way to export a cell on Excel 2010 to a field on Word?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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