Re: macro that open header
Hi Andy
Thank you for your reply. It seems that I can't use that. Meaning that I can't get it to work.
The macro I have now look like this.
[vba]Sub Button1_Click()
Range("A1:D4").Select
Selection.Copy
intPrintJobs = Range("A24")
aNameAndPath = Range("C26")
Range("A7").Select
Set appWD = CreateObject("Word.Application")
appWD.Visible = True
appWD.documents.Open Filename:=aNameAndPath
appWD.Selection.Paste
Application.CutCopyMode = False
appWD.ActiveDocument.PrintOut , Copies:=intPrintJobs
End Sub[/vba]
("A24") is the numbers of print I want.
("C26") is the document I want to open.
Range ("A1:D4") is what i want to copy into the header of the Word document.
I have tried what you said, but I get it to work. Maybe I write it wrong. maybe you can change my code so it works.
Regards
Mads