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 / December 2004

Tip: Looking for answers? Try searching our database.

Invalid Filename accessing WordApp.Documents(Name)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alfons Puig - 15 Dec 2004 16:43 GMT
Hi,

I get the Invalid Filename when trying to access a document using
WordApp.Documents(Name) while Name=WordApp.Documents(1).Name

This document is loaded inside Internet Explorer and Name =
"Word.asxp?IdDoc=PRV26241&Action=Dis"

I can't access the document using the item number because it changes from 1
to 2 if another word document is opened in the same machine.

I would like to know how to force a document name when loading the document.
To load it I use the folowing ASP.Net code:

   Response.ContentType = "Application/msword"
   Response.AddHeader("Content-Disposition", "inline; filename =
FileName.doc")
   Response.BinaryWrite(File)
   Respoinse.End()

Thanks.

Alfons
Word Heretic - 16 Dec 2004 05:12 GMT
G'day "Alfons Puig" <AlfonsPuig@discussions.microsoft.com>,

Normally its something like

Set SourceDoc = ActiveDocument
Set TargetDoc = Documents.Add

then you just use SourceDoc and TargetDoc

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Alfons Puig reckoned:

>Hi,
>
[quoted text clipped - 19 lines]
>
>Alfons
 
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.