P
Pai Chung
Hello everyone, I am experiencing some trouble using the SourceDoc
property.
Basically I want to create a link using VBA.
What I currently use is a form with an Bound object frame that will
hold the OLE link.
I use code to retrieve the path and then I feed it into the object
(set to the frame) in the sourcedoc property and then I do the create
link action.
I use an undefined object variable because I am not sure what type of
file will be linked to. Here is the "code" itself.
Dim oleTemp As Object
Set oleTemp = Me.oleLink
oleTemp.SourceDoc = Me.OpenArgs
oleTemp.Action = acOLECreateLink
OpenArgs obviously is the path I retrieved.
Following is the problem.
First of all it seems to use "archaic" DOS paths like C:\Progra~1\
etc.
The other part is that on some machines I can only make it work if the
file / folder names do not exceed 8 characters so c:\Progra~1 becomes
unacceptable although c:\test.doc is acceptable.
Anyone have any ideas, or perhaps an alternative to attaching files
using VBA in a OLE Field of a table.
Thanks!
Pai Chung
Audit Leverage Software
property.
Basically I want to create a link using VBA.
What I currently use is a form with an Bound object frame that will
hold the OLE link.
I use code to retrieve the path and then I feed it into the object
(set to the frame) in the sourcedoc property and then I do the create
link action.
I use an undefined object variable because I am not sure what type of
file will be linked to. Here is the "code" itself.
Dim oleTemp As Object
Set oleTemp = Me.oleLink
oleTemp.SourceDoc = Me.OpenArgs
oleTemp.Action = acOLECreateLink
OpenArgs obviously is the path I retrieved.
Following is the problem.
First of all it seems to use "archaic" DOS paths like C:\Progra~1\
etc.
The other part is that on some machines I can only make it work if the
file / folder names do not exceed 8 characters so c:\Progra~1 becomes
unacceptable although c:\test.doc is acceptable.
Anyone have any ideas, or perhaps an alternative to attaching files
using VBA in a OLE Field of a table.
Thanks!
Pai Chung
Audit Leverage Software