Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I am trying to get a named range into a word document.....I have thi code.... It creates a word document correctly with the right path however, ho do i get the named range into the word document?? Any Ideas?? Thanks - Dani Sub MakeWordFile() ' Creates Word document Dim WordApp As Object On Error Resume Next Application.ScreenUpdating = False ' Start Word and create an object Set WordApp = CreateObject("Word.Application") With WordApp .Documents.Add End With ' Determine the file name SaveAsName = ThisWorkbook.Path & "\" & "volumeslast2weeks.doc" ' Select worksheet Sheets("NETWORKS").Select ' Information from worksheet Set Data = Sheets("Networks").Range("Changes") ' Send commands to Word With WordApp With .Selection '?????SOMETHING TO GO HERE TO IMPUT THE DATA IN RANG "Changes" or Variable Set Data???? End With End With ' Save the Word file and close it With WordApp .ActiveDocument.SaveAs Filename:=SaveAsName .ActiveWindow.Close ' Kill the object .Quit End With Set WordApp = Nothing ' Reset status bar Application.StatusBar = "" MsgBox "Completed and saved " & ThisWorkbook.Path End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 - link named excel range to word document | Excel Discussion (Misc queries) | |||
Inserting data into Word document by a range of dates from Excel spreadsheet | New Users to Excel | |||
convert excel document to word document (not a picture) | Excel Discussion (Misc queries) | |||
Can you transform an excel document into a word document? | Excel Discussion (Misc queries) | |||
Inserting selected range into Word document | Excel Programming |