Obtaining Name and Path of a word doc open in an IE frame

F

Fred Hemmingsen

In a document I capture the 'Document_Close' event.
In this function I automatically save the doc, obtaining
the name and path through 'ThisDocument.FullName'.
The doc is used as a form, normally opened in a frame in
IE (allowing user to fill in information while being
presented other info in another frame).
The capture of the 'Document_Close' event (with save
functionallity) ensures that information in the form is
not lost if the user closes IE or navigates away from the
document. (There are actually two 'forms' in two frames,
with a third frame containing other info)

Problem:
When opening a document stored
localy, 'ThisDocument.FullName' returns what I would
expect (path+name, and all is well).
When opening a document stored on a network-
drive, 'ThisDocument.FullName' returns "Document In
Microsoft Internet Explorer".
When I then close IE, I get an error message informing me
that I can not save a document with the same name as
another open document (they are both named "Document In
Microsoft Internet Explorer", with null path).

How do I get the original path+name, in the document code?

Note: Yes I know this is not the best/nicest way to do
what I want to do. I was handed this well into the
implementation phase, too late to change etc............

Cheers,

Fred
 
S

Steve Danielson [MS]

Hi Fred,

I made a small sample here, an html file that contained a 2nd html file
which had 2 links to a word document: 1 with a web folder and the other one
to a UNC share. I clicked the links to run the document, and then got the
application.fullpath, and in both cases it properly gave the filename.

When you access the word doc in the network drive, are you using a UNC path
or a mapped drive?

Can you try using the UNC path?

For information and sample code for integrating Office with Visual Basic,
Visual C++, Internet Scripts, and other programming languages, please see
http://msdn.microsoft.com/library/techart/VSOfficeDev.htm. This site
contains the most up-to-date information for using developer tools for
Office integration and extensibility.

Best regards,
Steve Danielson
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? Please visit the Microsoft Security & Privacy Center
(http://www.microsoft.com/security) for the latest news on security updates.
 
F

Fred Hemmingsen

Steve,

this, after some initial testing, appears to have been the
problem.
I have been accessing the files through a mapped drive,
using the UNC path, as suggested, appears to resolve the
above problem.

Interesting to see how the returned path+name
is 'resolved' using the mapped drive letter, when using
the UNC path.'

Cheers,

Fred
 
S

Steve Danielson [MS]

Hi Fred,

I am glad to hear that it is now working for now. I am not sure what is
going on behind the scenes with regard to resolving the mapped drive vs the
UNC path.

Best regards,
Steve Danielson
Microsoft Developer Support

For information and sample code for integrating Office with Visual Basic,
Visual C++, Internet Scripts, and other programming languages, please see
http://msdn.microsoft.com/library/techart/VSOfficeDev.htm. This site
contains the most up-to-date information for using developer tools for
Office integration and extensibility.

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? Please visit the Microsoft Security & Privacy Center
(http://www.microsoft.com/security) for the latest news on security updates.
 

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