Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code.
Range("A7:N7").Select Selection.Copy Dim appWD As Word.Application Dim odoc As Word.Document Set appWD = CreateObject("Word.Application") appWD.Visible = True Set odoc = appWD.Documents.Add odoc.Range.PasteExcelTable False, False, False Set appWD = Nothing And it works but I want to copy multiple ranges, I can set up the loop required but how do I switch back and forth between the applications. When I try Application.ActivateMicrosoftApp xlMicrosoftExcel it brings up the calculator???? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You should have an object set to your Excel Workbook.
objYourXLWKbObject.Activate should be what you need. Ed "Rominall" wrote in message ... I have the following code. Range("A7:N7").Select Selection.Copy Dim appWD As Word.Application Dim odoc As Word.Document Set appWD = CreateObject("Word.Application") appWD.Visible = True Set odoc = appWD.Documents.Add odoc.Range.PasteExcelTable False, False, False Set appWD = Nothing And it works but I want to copy multiple ranges, I can set up the loop required but how do I switch back and forth between the applications. When I try Application.ActivateMicrosoftApp xlMicrosoftExcel it brings up the calculator???? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007-send Word Art text to back | Excel Discussion (Misc queries) | |||
Long text, Excel to Word, then back again | Excel Discussion (Misc queries) | |||
Excel 2007 opens in word, how do you default back to Excel? | Excel Discussion (Misc queries) | |||
Excel document was saved to word in error how do I get it back | Excel Discussion (Misc queries) | |||
Embedded word doc changed to image-need to change back to word. | Excel Discussion (Misc queries) |