💼 Hire Me for Excel VBA Automation
Need help automating your Excel workflows? I specialize in building custom Excel VBA solutions to save you time and eliminate repetitive tasks.
👉 https://www.upwork.com/freelancers/~013bd05e311ebf4a2c
Excel VBA Macro: Create Word Document (and Write with Excel). In this video, we go over how to use excel vba to open a new word doc and type text into the document. We go over how to type directly from a string in our code, and by using a string from a cell in an excel workbook.
Code:
Sub create_word_doc()
Dim objWord
Dim objDoc
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add
With objWord
.Visible = True
.Activate
.Selection.typetext ("Hello World!")
.Selection.typeparagraph
.Selection.typetext (ThisWorkbook.Sheets("Sheet1").Cells(1, 1).Text)
End With
End Sub
#ExcelVBA #ExcelMacro
Download
0 formats
No download links available.
Excel VBA Macro: Create Word Document (and Write with Excel) | NatokHD