Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.vba.general,microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.word.vba.userforms
|
|||
|
|||
![]()
Hi-
I am new to VBA. I am making an automated report by copying excel tables and pasting them in word. I want to use word VBA instead of excel. I can get the tables to paste into word, but I can not get them to be linked, so that when a parameter changes in excel it automatically updates in my word document. The PasteExcelTable command isn't working and I have the LinkedToExcel = true. I pasted my code below. I am also having difficulty getting the excel table to paste into the right document. I tried running the code in a module in the document and also running the code in the document itself. But if another word document is open, it sometimes pastes the table in the other document. Can someone please help me!! Thank you in advance- Sarah Sub MissionDesignTemplate() Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim strLVParameters As String Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("C:\Documents and Settings\shornbec\Desktop\sarah\excel templates\Mission.FY07Q1_Sarah.xls") xlBook.Sheets("Report Tables").Range("LVParameters").Copy Selection.PasteExcelTable LinkedToExcel:=True, WordFormatting:=False, RTF:=False xlBook.Close xlApp.Quit Set xlBook = Nothing Set xlApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I link my Excel Cells to a table in a Word Document | Excel Discussion (Misc queries) | |||
Link Excel S/Sheet cells to Table in Word document | Excel Discussion (Misc queries) | |||
Link table from excel to word using word VBA | Excel Discussion (Misc queries) | |||
How do I link excel to word so excel changes appear in word? | Excel Discussion (Misc queries) | |||
how do i link a word to a colour so everytime i type the word gre. | Excel Discussion (Misc queries) |