I am creating documentation that we use to run daily tasks and I am trying to automate some of it. Part of the process we need to import a few text files into excel then save them after a few modifications into another folder. I coded it first in excel, now I am moving it into Word and this is the code I have:
It looks correct but I keep receiving a compile error on the Worksbooks.OpenText line that says "Expected Function or Variable." That works in Excel. I even tried Excel.Workbooks.OpenText and xl.Workbooks.OpenText. I already set a Reference to the Excel Object model in the References section. What am I missing here?
Bookmarks