I want to transfer some pieces of information from Excel to a word document then save it as a new word document
Last edited by writelearner; Mar 24th, 2005 at 01:47 PM.
sorry it was already in the forum this code works VB Code: Sub test() Dim objExcel As Object Set objExcel = CreateObject("word.Application") ' Make Excel visible' objExcel.Visible = True 'Open template' Dim wb As Object Set wb = objExcel.documents.Open("F:\dummy.doc") Set wb = objExcel.Application.Run("F:\dummy.doc!mes") End Sub
Sub test() Dim objExcel As Object Set objExcel = CreateObject("word.Application") ' Make Excel visible' objExcel.Visible = True 'Open template' Dim wb As Object Set wb = objExcel.documents.Open("F:\dummy.doc") Set wb = objExcel.Application.Run("F:\dummy.doc!mes") End Sub
Forum Rules