Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Filename passed to WLL differs in 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ANB - 15 Dec 2007 00:08 GMT
I have a WLL written using the WordBasic C API from way back when. When a
document is opened it takes some action based on the filename (retrieved
using wdFileNameInfo). This worked fine in 2003 and below, but the filename
it is given in 2007 differs from the actual name of the file; instead it is
given a copy of the file in Temporary Internet Files with a random-looking
name.

I haven't been able to find any information about this behavior. Is there a
possible work-around?

Also, supposing I wanted to port this WLL to something a bit more modern,
what is the preferred way of creating extensions to word?
ANB - 04 Jan 2008 22:10 GMT
> I have a WLL written using the WordBasic C API from way back when. When a
> document is opened it takes some action based on the filename (retrieved
[quoted text clipped - 8 lines]
> Also, supposing I wanted to port this WLL to something a bit more modern,
> what is the preferred way of creating extensions to word?

Some updates: I've found that the behavior of WordBasic.FileName$ differs in
2007 compared with other versions, but only when the document is opened from
a UNC path. So, this:

Sub Foo()
   myFN = WordBasic.FileName$()
   ActiveDocument.Content.InsertAfter(myFN)
End Sub

Will write the correct filename when the document is on a local drive and
will write "C:\Documents and Settings\<user>\Local Settings\Temporary
Internet Files\Office.MSO\<foo>.docx" when the document was opened from a UNC
path or mapped drive.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.