Set oAttachment = oDoc.GETATTACHMENT(myValues(0)) fails when the attachment name has slashes.
When asking for the NotesItem.Values property it returns name as "myfile.pdf" which causes an error when calling oDoc.GETATTACHMENT(myValues(0))
When looking at that attachment name from within lotus notes the name is actually /someDirectory/anotherDirectory/myfile.pdf
How do I retrive the correct attachment name ?
We are using VB6 and Lotus Notes 6
Dim oAttachment As Object
Dim oItem As Object
Dim myItems, myValues
Dim filename As String, strFinalPath As String
If oDoc.hasEmbedded Then
myItems = oDoc.Items
For i = UBound(myItems) To 0 Step -1
Set oItem = myItems(i)
If oItem.Type = 1084 Then ' Attachment
myValues = oItem.Values
Set oAttachment = oDoc.GETATTACHMENT(myValues(0))
Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.
What are they?
An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…