Assigning a value to the SourceDoc property.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top