Sorry I forgot the code tabs:
Sub excelToWord_click()
'copy cells
Worksheets(1).Range("A1:D2").Select
Selection.Copy
Range("A3").Select
'Open the word document
aNameAndPath = Range("A4")
Set wdApp = CreateObject("Word.Application")
wdApp.documents.Open...
Hi
Now I have the way to paste my Excel cells into the Excel cells i have already in my Word header. The problem now is that the word document change to "Normal" view. I have tried to record a macro in Word and then paste that into my Excel macro. So that Word comes back to Print Layout View...
Hi FOB
Thank you for the help. I have changed the code a little bit. The code looks like this now:
Sub excelToWord_click()
'Open the word document
Set wdApp = CreateObject("Word.Application")
wdApp.documents.Open "H:\test_01.doc"
wdApp.Visible = True
'copy cells...
Hi all
I have a macro in Excel 2003 that opens a Word document. And it's working as it should. Now I also want that macro to copy some of the cells from Excel to Word. I have made Excel cells in Word and it's there I want to paste the cells from Excel.
Is that possible??
Mads
This one only works for Word documents not for PDF files. Maybe you can help me with that.
By the way by changing
appWD.Visible = True
to
appWD.Visible = false
then the macro only print the Word document.
mads
Hi All
I have given up this. I have found a way to open a document and then print it acording to a calculation in excel. So the people who is going to work with this have to open the document first.
Best regards
Mads
Hi to the ones that have tried to help me.
I have on another website found what I needed. The macro is like this:
intPrintJobs = Range("a2")
aNameAndPath = Range("a1")
Set appWD = CreateObject("Word.Application")
appWD.Visible = True
appWD.Documents.Open...
I have made a macro in Excel 2003 that open and print another Excel document. Now I want the same macro to close that document I opened and printet. But it have to close without saving. I have tried to record it but then I'm ask if I want to save. I'm trying to avoid that quistion.
regards
Mads
Hi there
I have a Excel document (1) where I make a calculation. In that document I also have a macro that opens another Excel document(2). In that macro I want to copy 4 cells from document (1) to document (2). I also want that the macro can print document (2).
I'm using Excel 2003.
Can...
Hi
Cell "c1" is the path and file name of the document I want to print. That file can be a Word file or a PDF file.
I want that Excel can print the document.
If I understand you (PHV) right then can't i make excel to print that document. Is that right??
Mads
Hi PH
Thank you for the help. But it doesn't work. When i run the macro then I get the messag that say "Object required" and "run-time error "424""
Right now the macro look like this:
Dim intPrintJobs As Integer
intPrintJobs = Range("a1")
fNameAndPath = Range("c1")...
Hi Gleen
It's not a Excel document. It can be a Word Document but it can also be a PDF document.
It will be OK to open the document first but I hope that it can be printed without open it.
Sorry I have't hear about literalist show-jumper. Sorry
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.