Invalid Filename accessing WordApp.Documents(Name)

A

Alfons Puig

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
 
W

Word Heretic

G'day "Alfons Puig" <[email protected]>,

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:
 

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