Reading data from ini-file using VBA i Outlook 2003
Posted on 2009-04-25
I have an ini-file with som data, and need to read the data with a vba-script created within Outlook 2003. I have another script in word where I used the command System.PrivateProfileString That command doesn't work in Outlook.
Then I found a solution stating, that I should add a reference to Microsoft Word object Library and use the following command:
Dim wd As Word.Application 'for testing
Set wd = New Word.Application ' create the Word application object
Set wd = Nothing ' destroy the Word application object 'for testing
That solution works, but has two drawbacks. 1) Its slow 2)it opens a word instance, and it doesn't close that word instance again. So its really not a solution.
What to do?