PDA

View Full Version : [SOLVED:] Read from Excel file without opening Excel window



Cheesecube
04-23-2020, 09:49 PM
Hi, lets say I have an external application e.g. Word or Outlook. I want to read from an Excel file but I don't want to open an Excel window because I want it to run in the background for UX purposes. How do I do this?

E.g. give a sample program which runs in Microsoft Word, retrieves a value variable from an Excel file using VLookup in the background, then outputs the result in Word

macropod
04-24-2020, 12:08 AM
You could, of course, automate a hidden Excel session. Alternatively, you could use ADODB, which avoids the need for the code to interact with Excel at all. See posts 2 & 23 in: https://www.msofficeforums.com/word-vba/16330-how-import-list-excel-into-drop-down.html