Production Planner
New Member
- Joined
- Apr 19, 2011
- Messages
- 15
Hi Guys & Girls,
I need some help with a macro to Save a word doc as a File name based on a value ("C5") in the excel sheet it copied from. Then after it has done this I would like it to close the word doc and return to the spreadsheet.
This is what I have so far for copy and pasting the picture to the word doc.
Thanks for you help in advance.
Cheers
I need some help with a macro to Save a word doc as a File name based on a value ("C5") in the excel sheet it copied from. Then after it has done this I would like it to close the word doc and return to the spreadsheet.
This is what I have so far for copy and pasting the picture to the word doc.
Code:
Sub PullListP1_Picture3_Click()
Dim wdApp As Object
Dim wd As Object
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set wdApp = CreateObject("Word.Application")
End If
On Error GoTo 0
Set wd = wdApp.Documents.Open("B:\Staff Folders\cft\Production Planner\ORDER DELIVERY & PRODUCTION PLANNING\PULL LISTS P1\TEMPLATE")
wdApp.Visible = True
Range("B2:I70").CopyPicture xlPrinter, xlPicture
wd.Range.Paste
End Sub
Thanks for you help in advance.
Cheers