I wan't to do something like
Sub MyProc()
Dim strPath As String
Dim db As Database
Set db = OpenDatabase("db2.mdb")
Dim rs As Recordset
Set rs = db.OpenRecordset("test01", dbOpenDynaset)
Do While Not rs.EOF
strPath = rs("path")
' ole
[OLEPath] = strPath
[OLEFile].Class = [OLEClass]
[OLEFile].OLETypeAllowed = acOLEEmbedded
[OLEFile].SourceDoc = [OLEPath]
[OLEFile].Action = acOLECreateEmbed
rs.MoveNext
Loop
End Sub
The test01 table looks like:
Path OLEObject
c:/test/1.jpg
c:/test/2.jpg
And the filed OLEObject is an OLE field. We want to embed the photos in the OLE field
But it says external name not defined, meaning the OLEPath. I guess OLEPath only works for a newer version of Access? I'm using access 97.
We got a bunch of photos to embedd and it sure would be nice to find a coding solution.
Is there a way to do this in 97?