Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-08-2012, 12:37 AM
jillapass jillapass is offline linking to excel from word Windows 7 32bit linking to excel from word Office 2007
Novice
linking to excel from word
 
Join Date: Dec 2011
Posts: 26
jillapass is on a distinguished road
Default

I need vba because it is part of a program to get various information to save the file.
I need to get the info from a particular cell in excel, which I can do, but my code which I have shown below opens the spreadsheet, but I get an error because it is already open.

I was pushing the info from excel into content control fields, but I had to move the fields into the header and I cannot find a way to refer to header content controls from excel, it worked fine when they were in the main body of the word document, but cannot see the header ones.

Dim exWb As Excel.Workbook
Dim objexcel As New Excel.Application
Set exWb = objexcel.Workbooks.Open("M:\care plan system\menu forms\office forms menu.xlsm")

Dim advisor
advisor = exWb.Sheets("menu").Cells(5, 4)
ThisDocument.SelectContentControlsByTitle("LAA").I tem.Range.Text = advisor
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
linking to excel from word linking word from Excel Lorna B Word 1 03-22-2012 03:36 PM
linking to excel from word Linking graphs from excel Markc PowerPoint 2 05-11-2010 02:17 AM
Linking Excel to Word engineer_in_training Word 0 01-06-2010 01:30 PM
Linking Excel Pivot Tables in a Word Document wmarsh3561 Word Tables 0 11-17-2009 06:29 AM
Linking from Excel to Word streng Word 4 10-28-2008 08:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft