‘In column C:Z : Filenames like this C:DataBook2.xls (don’t have to be Excel files)
#Excel for mac vba extract data from closed workbook code
If you wan met to paste the code here I will paste it. I want to open the word document from excel hyperlink then copy the whole document and need to paste the same in body of the mail. for this I have a word document, which is stored in excel cell as a hyperlink. I have created one macro to send a automatic mails to the employees for this medical reminders for this I have fixed all the issue except the body of the mail. ObjDoc.Close SaveChanges:=wdDoNotSaveChanges 'Now store that variable value in to a cell range 'To Store all the content of that word Document in a variable Set objDoc = ("C:\Users\Vish\Desktop\New Microsoft Office Word Document.docx") 'Open a Word Document and Set it to the newly created object above 'Create a New Object for Microsoft Word Application To work the below code you need to Add the reference of Microsoft Word in your Excel Workbook.Īpplication.DisplayAlerts = False 'Disable all the Alerts from excelĪpplication.ScreenUpdating = False 'After opening Word Doc, Document will not be visible Opening an Word Document is more like Excel Workbook only. This is the first article which opens a Word Document and read the whole content of that Word Document and put it in the Active Worksheet in a particular Cell. I am going to write few articles about Word from Excel Macro. As many of us want to deal with Microsoft Word Document from Excel Macro/VBA.