how can I embed inside an Excel file a Word file, and then with VB module launch the word file (In MS-Word, not as an Excel object) and control it?
untill now i just used 2 seperate files - the Excel and the Word, and the user had to direct the Excel (with a form i made) to the Word's file path (the 'strpath' argument that you can see in the snippet). then, the excel launched the Word file and made changes to it. you can see in the snippet an example of how I did that. by embeding the Word inside the Excel, i want to avoid all of that user directing phase, and automate the described process.
Appreciate your help!
Sub CreateReport(strpath As String)
Dim Objdoc As Object
Dim Wks As Excel.Worksheet
Set Objdoc = GetObject(strpath, "Word.Document")
Set Wks = ThisWorkbook.Sheets(1)
'An example of how I use the code to manipulate the Word file
Set Objdoc = Nothing
Set Wks = Nothing