this Vb code.At first choice which area transfer from Ms excel this area select in Vb code section(Range change as you need)than click button automatic create a word file with data in this folder which folder/drive you work.
Sub proWord()
Dim varDoc As Object
Set varDoc = CreateObject("Word.Application")
varDoc.Visible = True
Sheets("Sheet1").Range("A1:C50").Copy '<---Range change as you need
varDoc.documents.Add
varDoc.Selection.Paste
varDoc.activedocument.SaveAs ThisWorkbook.Path & "/" & "Copy Word.doc"
varDoc.documents.Close
varDoc.Quit
Application.CutCopyMode = False
End Sub
'--------Md.Shaiful islam talukder---------------

0 comments :
Post a Comment