This is probably a pretty trivial question to answer, but I'm very new at VBA, so my knowledge is pretty patchwork.
Basically, what I've done is I've got some VBA code in excel that I want to use to create a new word document from a template and then find/replace some marker text I've placed in it based on what's in the excel workbook. I think I've got the find/replace part down, but I can't seem to get the word document to open properly.
Here's the relevant code:
Set wordApp = New Word.Application
wordApp.Documents.Add Template:=ThisWorkbook.Path & "\Template.dotx"
When I run this code it executes fine, and a new WINWORD.EXE
process is spawned, but no new windows open, and as far as I can tell the document isn't actually open or active.
The workbook with the code and the template are saved in the same folder, so the path to root should be the same for both. I also have already added a reference to Word in the VB editor.
Like I said, this is probably pretty simple to fix. If someone can give me some guidance it would be greatly appreciated!