Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need to use an excel macro to close a word file....any suggestions?
|
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try the below. Make sure the name of word document is typed correctly....
Sub ControlWord() Dim appWord As Object Set appWord = GetObject(, "Word.Application") appWord.Documents("Content Management.doc").Close False End Sub -- Jacob "dwake" wrote: I need to use an excel macro to close a word file....any suggestions? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Tried that and it didnt work. The problem I'm having is closing the word
document after it has been used. Here is my code below. Any help would be appreciated. Sub WordToExcel() Dim MyWd As Object Set MyWd = GetObject("Audit Tracking.doc") MyWd.ActiveWindow.Selection.WholeStory MyWd.ActiveWindow.Selection.Copy Sheet8.Range("A1").PasteSpecial xlPasteValues End Sub "Jacob Skaria" wrote: Try the below. Make sure the name of word document is typed correctly.... Sub ControlWord() Dim appWord As Object Set appWord = GetObject(, "Word.Application") appWord.Documents("Content Management.doc").Close False End Sub -- Jacob "dwake" wrote: I need to use an excel macro to close a word file....any suggestions? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try
Sub ControlWord() Dim appWord As Object Set appWord = GetObject(, "Word.Application") appWord.Documents("Audit Tracking.doc").ActiveWindow.Selection.Copy Range("A1").PasteSpecial xlPasteValues appWord.Documents("Audit Tracking.doc").Close False End Sub -- Jacob "dwake" wrote: Tried that and it didnt work. The problem I'm having is closing the word document after it has been used. Here is my code below. Any help would be appreciated. Sub WordToExcel() Dim MyWd As Object Set MyWd = GetObject("Audit Tracking.doc") MyWd.ActiveWindow.Selection.WholeStory MyWd.ActiveWindow.Selection.Copy Sheet8.Range("A1").PasteSpecial xlPasteValues End Sub "Jacob Skaria" wrote: Try the below. Make sure the name of word document is typed correctly.... Sub ControlWord() Dim appWord As Object Set appWord = GetObject(, "Word.Application") appWord.Documents("Content Management.doc").Close False End Sub -- Jacob "dwake" wrote: I need to use an excel macro to close a word file....any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to save and close, then copy file | Excel Discussion (Misc queries) | |||
How to close a excel file using Macro coding? | Excel Worksheet Functions | |||
How to close a excel file using Macro coding? | Excel Discussion (Misc queries) | |||
How to code the Macro to save and close a file? | Excel Discussion (Misc queries) | |||
Macro to Open, then Close another File | Excel Discussion (Misc queries) |