The 'LinkedToExcel" is a required parameter for the PasteExcelTable method. This is the macro line I'm trying to convert from VB, as shown in my Word madro editor:
Selection.PasteExcelTable False, False, False
If I look up the PasteToExcel Method in Word help (I'm using Word2007) it shows the following parameters:
Pastes and formats a Microsoft Excel table.
Syntax
expression.PasteExcelTable(LinkedToExcel, WordFormatting, RTF)
expression Required. A variable that represents a Selection object.
Parameters
LinkedToExcel Required Boolean True links the pasted table to the original Excel file so that changes made to the Excel file are reflected in Microsoft Word.
WordFormatting Required Boolean True formats the table using the formatting in the Word document. False formats the table according to the original Excel file.
RTF Required Boolean True pastes the Excel table using Rich Text Format (RTF). False pastes the Excel table as HTML.
Example
This example pastes an Excel table into the active document. The parameters specify that the pasted table is linked to the Excel file, retains the original Excel formatting, and is pasted as RTF. This example assumes that the Clipboard contains an Excel table.
Visual Basic for Applications Sub PasteExcelFormatted() Selection.PasteExcelTable _ LinkedToExcel:=True, _ WordFormatting:=False, _ RTF:=True End Sub
In reply to Re^2: Trying to use Win32::OLE PasteExcelTable method
by aaronbaum2000
in thread Trying to use Win32::OLE PasteExcelTable method
by aaronbaum2000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |