T
Thomas Lindberg
I have a macro that out of an text file creates a Word doc by applying
context sensitive logic and selection.
The text file contains sometimes an URL to a server inside our company
domain, the URL points to a
specific file that shall be inserted into the Word doc.
The URL looks like this
\\servername.mycomp.com\folder1\subfolder\subsubfolder\aFile.pdf
alternative the IP-addr of the server.
If the file is an Office type file (.doc, .xls, .ppts, etc) the standard
Selection.InsertFile URL
works fine as expected.
If the URL points to a .pdf the method above produces garbage.
The alternative metod
Selection.InlineShapes.AddOLEObject ...
doesn't work, I get the error reported in
http://support.microsoft.com/default.aspx?scid=kb;en-us;819031
(The method works if I have the file locally in my PC)
Neither of the two proposed workaround methdods work, I get an run-time
error message saying
" ODBC Driver Manager: Data source too long "
I can not find any comfort and help that applies the Word VBA searching the
net for this.
Anybody here that has a solution/workaround for this??
(And possibly an explanation why this isn't solved, seems to be a wellknown
error.)
TIA
Thomas
context sensitive logic and selection.
The text file contains sometimes an URL to a server inside our company
domain, the URL points to a
specific file that shall be inserted into the Word doc.
The URL looks like this
\\servername.mycomp.com\folder1\subfolder\subsubfolder\aFile.pdf
alternative the IP-addr of the server.
If the file is an Office type file (.doc, .xls, .ppts, etc) the standard
Selection.InsertFile URL
works fine as expected.
If the URL points to a .pdf the method above produces garbage.
The alternative metod
Selection.InlineShapes.AddOLEObject ...
doesn't work, I get the error reported in
http://support.microsoft.com/default.aspx?scid=kb;en-us;819031
(The method works if I have the file locally in my PC)
Neither of the two proposed workaround methdods work, I get an run-time
error message saying
" ODBC Driver Manager: Data source too long "
I can not find any comfort and help that applies the Word VBA searching the
net for this.
Anybody here that has a solution/workaround for this??
(And possibly an explanation why this isn't solved, seems to be a wellknown
error.)
TIA
Thomas