Create Word using ASP

Results 1 to 2 of 2

Thread: Create Word using ASP

  1. #1
    Join Date
    Dec 1969

    Default Create Word using ASP

    Hi <BR><BR> I want to create a word document via asp<BR><BR> I have created a Dll that will create word doc from a template <BR><BR> but it give the error<BR><BR> Microsoft Word (0x800A175D)<BR> Could not open macro storage.<BR> /abhi/totalfinaelf/www_asp/telecharger2.asp, line 14<BR><BR> <BR>&#060;%<BR> dim comp1, dri, dam<BR> set comp1 = server.CreateObject("WordCreater.TotalFinaElf") <BR> <BR><BR> &#039; the below line is line 14 <BR> dri = comp1.sCreateWord("unicorn11", "asdfa", "asfda", "asdfad", "asdfasdf", "asdfaf", "asdfad", "asdfadf", "asdfasdf", "asdfad", "asdfas", "asdfas", "asdfa", "asdfa", "asfda", "asfda", "asdfa", "asdfasdf", "asdfas", "asdfas", "asdfads")<BR><BR>%&#062;<BR>if the same dll is to be called from a VB Project then it is running fine <BR><BR>what could be the error here ?<BR><BR>the VB code is <BR><BR>Function sCreateWord(sSpecname, sPass, sCDT, sQ141_1, sQ141_2, sQ141_3, sQ142_1, sQ142_2, sQ142_3, sQ142_4, sQ142_c, sQ143_1, sQ143_2, sQ143_3, sQ143_c, sQ144_1, sQ144_2, sQ144_3, sQ144_4, sQ144_5, sQ144_c)<BR> <BR><BR> Dim wrdAp As Word.Application<BR> Dim wrdDoc As Word.Document<BR> <BR> Set wrdAp = CreateObject("Word.Application")<BR> Set wrdDoc = wrdAp.Documents.Open("C: emplete1.doc")<BR><BR> wrdAp.Visible = True<BR><BR> wrdDoc.Range.Fields(1).Result.Text = sSpecname<BR> wrdDoc.Range.Fields(2).Result.Text = sPass<BR> wrdDoc.Range.Fields(3).Result.Text = sCDT<BR> wrdDoc.Range.Fields(42).Result.Text = sQ141_1<BR> .<BR> .<BR> .<BR> wrdDoc.Range.Fields(57).Result.Text = sQ142_5<BR><BR> wrdDoc.SaveAs ("c: empabhi1.doc")<BR> <BR> wrdDoc.Close<BR> wrdAp.Quit<BR> <BR> Set wrdDoc = Nothing<BR> Set wrdAp = Nothing<BR> sCreateWord = 1<BR><BR>End Function<BR><BR><BR>is there some sort of rights that have to be set for the word document to be saved at a particular location <BR><BR>regards

  2. #2
    Join Date
    Dec 1969

    Default RE: Create Word using ASP

    probably permissions. running in VB ytou&#039;d have the security context of the currently logged in user. from ASP you&#039;d be under the context of "IUSR_MachineName"<BR><BR>try adding permissions, or forcing a login (but don&#039;t make your server insecure trying).<BR><BR>j

Posting Permissions

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