Cant Open a word document from ASP page

Results 1 to 2 of 2

Thread: Cant Open a word document from ASP page

  1. #1
    Join Date
    Dec 1969

    Default Cant Open a word document from ASP page

    Hi, <BR>This i what i want. I need to send a fax online, which contains some static and some dynamic text(from database). So, i have designed a word template in which i have some "placeholders", which i will be replacing with the databse stuff.<BR>So, i dont need to open it on the browser, neither i want to open a word document on client, all i need to make some changes to template internally and then save with some different name.<BR><BR>So, iam trying to open a word object and then make this template file active. <BR>and this is code..<BR><BR>sPath = Server.Mappath("..")<BR>sPath = sPath&"getamoverFaxRead.doc"<BR><BR>Set objWord = Server.CreateObject("Word.Application")<BR>respons e.write objWord.Version<BR><BR>objWord.Application.Visible = False<BR>response.write "reached here 1"<BR><BR>&#039;Set objDocument = objWord.Documents.Add sPath<BR>Set objDocument = objWord.Documents.Add ("e:inetpubwwwrootgetamoverTitle2.doc")<BR><BR>res ponse.write "reached here 2"<BR><BR>I can get the version number and the message "reached here 1", but when i say ".Add file"... the server hangs.... <BR>i donno what i need to do...<BR>Any help will be appreciated<BR><BR>Thanks<BR>Manoj

  2. #2
    Join Date
    Dec 1969

    Default RE: Cant Open a word document from ASP page

    I don&#039;t think this is how you really want to solve your faxing problem.<BR>I was involved in a project the we needed to convert office documents into HTML .. one of the programmers tried to do the same thing you are and the server was down with only 5 attempts.<BR>Here is the code that was used in the project (the code was compiled in VB):<BR><BR> Set w = New Word.Application<BR> With w<BR> .Visible = False<BR> Set d = .Documents.Open(strPath & ".doc", , False)<BR> End With<BR> <BR>Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts