im trying to add some code to a spreadsheet, but even a simple thing like range("a1") = date triggers the error "cant find project or library"
also, because of this error, i can't even insert a signature to the vba e-mail macro depsite doing this per https://www.rondebruin.nl/win/s1/outlook/signature.htm .foollowed this instructions but it still doesnt work!
<code>
Early Binding
If you want to use the Intellisense help showing you the properties and methods of the objects as you type you can use Early Binding. Bit faster also when you run your code but you can have problems when you distribute your workbooks. Excel will automatic update the reference number to Outlook when you open your workbook in a higher version of Excel/Outlook but not update it when you open it in a lower version of Excel/Outlook. With Late Binding as I used in the macro examples you not have this problem.
Add a reference to the Microsoft Outlook Library in Excel
1) Go to the VBA editor with the shortcut Alt - F11
2) Click on Tools>References in the Menu bar
3) Place a Checkmark before Microsoft Outlook ? Object Library
Where ? is the Outlook version number
Then replace this three lines in the code
Dim OutApp As Object
Dim OutMail As Object
Set OutMail = OutApp.CreateItem(0)
With this three lines
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutMail = OutApp.CreateItem(olMailItem)</code>
also, because of this error, i can't even insert a signature to the vba e-mail macro depsite doing this per https://www.rondebruin.nl/win/s1/outlook/signature.htm .foollowed this instructions but it still doesnt work!
<code>
Early Binding
If you want to use the Intellisense help showing you the properties and methods of the objects as you type you can use Early Binding. Bit faster also when you run your code but you can have problems when you distribute your workbooks. Excel will automatic update the reference number to Outlook when you open your workbook in a higher version of Excel/Outlook but not update it when you open it in a lower version of Excel/Outlook. With Late Binding as I used in the macro examples you not have this problem.
Add a reference to the Microsoft Outlook Library in Excel
1) Go to the VBA editor with the shortcut Alt - F11
2) Click on Tools>References in the Menu bar
3) Place a Checkmark before Microsoft Outlook ? Object Library
Where ? is the Outlook version number
Then replace this three lines in the code
Dim OutApp As Object
Dim OutMail As Object
Set OutMail = OutApp.CreateItem(0)
With this three lines
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutMail = OutApp.CreateItem(olMailItem)</code>
Last edited: