Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Help me!

Help me!

Scheduled Pinned Locked Moved Web Development
questionhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    t800t8
    wrote on last edited by
    #1

    I write a DLL, in that i create a Word application object for open a Word document. In VB app, it works well. But when i use that DLL in an ASP project. It doesn't work. How can i do that? Use Web service? I want to write a Web application like Mail Merge in VB. Give me some idea to write it for the Web. Thanks a lot!

    F 1 Reply Last reply
    0
    • T t800t8

      I write a DLL, in that i create a Word application object for open a Word document. In VB app, it works well. But when i use that DLL in an ASP project. It doesn't work. How can i do that? Use Web service? I want to write a Web application like Mail Merge in VB. Give me some idea to write it for the Web. Thanks a lot!

      F Offline
      F Offline
      Fernando Finelli
      wrote on last edited by
      #2

      write me the ASP code FF

      L T 2 Replies Last reply
      0
      • F Fernando Finelli

        write me the ASP code FF

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        ASP only call a function in DLL to return the name of Word document which is created.

        1 Reply Last reply
        0
        • F Fernando Finelli

          write me the ASP code FF

          T Offline
          T Offline
          t800t8
          wrote on last edited by
          #4

          ASP Code: <% Set objTest = Server.CreateObject("TestCOM.Test") objTest.PhysicalPath = Request.ServerVariables("APPL_PHYSICAL_PATH") objTest.gstrName = "aa.doc" Call objTest.OpenFile() %> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ VB Code: Option Explicit Private WithEvents mobjWordApp As Word.Application Private WithEvents wrdDoc As Word.Document Private m_gstrName As Variant Private m_PhysicalPath As Variant Public Property Get PhysicalPath() As Variant PhysicalPath = m_PhysicalPath End Property Public Property Let PhysicalPath(ByVal Value As Variant) m_PhysicalPath = Value End Property Public Property Get gstrName() As Variant gstrName = m_gstrName End Property Public Property Let gstrName(ByVal Value As Variant) m_gstrName = Value End Property Private Sub Class_Initialize() Set mobjWordApp = CreateObject("Word.Application") End Sub Private Sub Class_Terminate() Set mobjWordApp = Nothing End Sub Public Sub OpenFile() Dim Doc_Path As String Doc_Path = Me.PhysicalPath & "TempFiles\" & Me.gstrName Call mobjWordApp.Documents.Open(Doc_Path, False, False) Set wrdDoc = mobjWordApp.ActiveDocument Doc_Path = Me.PhysicalPath & "TempFiles\TestResult.doc" Call wrdDoc.SaveAs(Doc_Path) wrdDoc.Close Set wrdDoc = Nothing mobjWordApp.Quit End Sub +++++++++++++++++++++ Thanks any way!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups