Need help to convert Excel to Word

GirishDhruva

Active Member
Joined
Mar 26, 2019
Messages
308
Hi Everyone,
Here i am trying to convert data's from excel to word as a letter format but as i debugged and checked, from the highlighted line the code is skipped.
Can i know what wrong i have done/what changes i should make????

https://app.box.com/s/ylrujmxp79v84m0ejc50jw7spheo8a1y
In above link i have shared my worksheet

Below is my code

Rich (BB code):
Sub ControlWord()
    Dim appWD As Word.Application
    Set appWD = CreateObject("Word.Application.8")
    appWD.Visible = True


    Sheets("Revision").Select
    FinalRow = Range("A9999").End(xlUp).Row
    For i = 2 To FinalRow
        Sheets("Revision").Select
        Range("B" & i).Copy Destination:=Sheets("Template").Range("B3")
        Range("B" & i).Copy Destination:=Sheets("Template").Range("C5")
        Range("A" & i).Copy Destination:=Sheets("Template").Range("E5")
        Range("C" & i).Copy Destination:=Sheets("Template").Range("G5")
        Range("D" & i).Copy Destination:=Sheets("Template").Range("I5")
        Range("F" & i & ":L" & i).Copy Destination:=Sheets("Template").Range("B9")
        Worksheets("Template").Select
        ActiveSheet.UsedRange.Select
        Selection.Copy
        appWD.Documents.Add
        appWD.Selection.Paste
        appWD.ActiveDocument.SaveAs Filename:="Revised" & i
        appWD.ActiveDocument.Close
    Next i
    appWD.Quit
End Sub

Thanks in advance.
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
have you tried it as appWd.Paste ?
 
Upvote 0
I hope that method is not their and even i tried but its throwing me an error as "Method or Data Member not found"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,412
Messages
6,124,761
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top