+ Reply to Thread
Results 1 to 3 of 3

Update label in word document with value in excel cell

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    8
    Hello All,
    I have been looking for the answer an I couldn't find anything that works, apologies in advance if this issue has been solved here before!
    I need excel to open an existing word document (checked!) and update a Label on it with the value in a cell (not checked!). It sound really easy, but I didn't succeed!
    I create a word document, go developer / Design Mode / Legacy forms / Text Box (ActiveX control). The Text box will contain the value from the excel cell. Text Box is called TextBox1 and the property I need to pass the excel value from is called "Value"
    How can I link excel to the value in the TextBox?
    I have the following code:
    HTML Code: 
    but it fails in the line:
    objword.TextBox1.Value = Sheets("Sheet1").Cells(1, 1)
    Run-time error 438: Object doesn’t support this property or method
    I know it should be something really silly, but I can’t find out, thanks in advance for the help!
    Attached Files Attached Files
    Last edited by Pegaso; 01-27-2016 at 12:23 PM. Reason: Typo

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Update label in word document with value in excel cell

    Your syntax is a bit off. You need to set objDoc equal to the file you open, because that's where the TextBox is, not in ObjWord, which you've only set to the Word Application.


    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Update label in word document with value in excel cell

    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

+ 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] Update document (Word file) on workbook open
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-14-2015, 06:39 AM
  2. [SOLVED] Can't print a WORD document after an externa update
    By oeldere in forum Word Formatting & General
    Replies: 3
    Last Post: 02-12-2015, 05:40 AM
  3. Converting a Word mailing label document to an Excel
    By MYITCO in forum Excel General
    Replies: 0
    Last Post: 05-13-2013, 01:29 PM
  4. NOT update External Links when opening a word document via excel macro
    By debbie2852 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2013, 04:49 PM
  5. Replies: 2
    Last Post: 08-22-2010, 02:40 AM
  6. Replies: 0
    Last Post: 10-06-2006, 09:05 AM
  7. [SOLVED] How do I imbed a Word document into an Excel cell?
    By Baxter in forum Excel General
    Replies: 2
    Last Post: 03-12-2005, 10:06 AM

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