Joe wrote:
Hi.
I'm using ASP to pull info from a database and open it in Word. Everything works fine but I want to specify the paper size to be Legal. Is this possible or am I stuck with Letter size?
Thanks
Joe
Questions:-
1. When you say "pull info" do you mean that your database has an
existing Word document as a BLOB or something? If not, what is the
format of your "info" and how are you opening it in Word?
2. When you say "open it in Word", do you mean client side or server
side?
Generally, the only way I can think of is to automate the instance of
the Word application you are running.
In JavaScript, something like:-
try
{
var oWord=GetObject("","Word.Application");
oWord.ActiveDocument.PageSetup.PaperSize=4; // wdPaperLegal
}
catch(e)
{
alert("Could not find or access an instance of Word.Application, or
there was no ActiveDocument open.");
}
However, on the client side, I think security restrictions are going to
be a problem.
Regards
Julian Turner