It's still not working, presumably because the Word macro has an End statement causing the variables to be forgotten
as long as you return the result before closing the document, it should work fine

declaring variables as public in the thisworkbook code module would work, but it would need the variables to be declared in each document, which may be a problem, so you would have to try declaring them in the template that is used by the opened document

alternatively you can save your variables values to any form of storage and retrieve by excel
or you might even be able to automate the workbook from your word macro to place the values directly in the cells