Click here to Skip to main content
16,005,099 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: ASP setup Pin
Fernando Finelli3-May-02 4:55
Fernando Finelli3-May-02 4:55 
GeneralRe: ASP setup Pin
patty3-May-02 7:39
patty3-May-02 7:39 
GeneralRe: ASP setup Pin
Nick Parker5-May-02 16:55
protectorNick Parker5-May-02 16:55 
GeneralRe: ASP setup Pin
patty6-May-02 0:12
patty6-May-02 0:12 
GeneralHelp me! Pin
t800t83-May-02 1:20
t800t83-May-02 1:20 
GeneralRe: Help me! Pin
Fernando Finelli3-May-02 4:49
Fernando Finelli3-May-02 4:49 
GeneralRe: Help me! Pin
3-May-02 4:57
suss3-May-02 4:57 
GeneralThis is my code. Pin
t800t83-May-02 17:58
t800t83-May-02 17:58 
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!
QuestionPossible Bug? Pin
Jamie Nordmeyer2-May-02 12:23
Jamie Nordmeyer2-May-02 12:23 
QuestionUploading writing text to a file? Pin
Rickard Andersson202-May-02 3:09
Rickard Andersson202-May-02 3:09 
AnswerRe: Uploading writing text to a file? Pin
Not Active2-May-02 7:12
mentorNot Active2-May-02 7:12 
GeneralRe: Uploading writing text to a file? Pin
Rickard Andersson202-May-02 20:37
Rickard Andersson202-May-02 20:37 
GeneralRe: Uploading writing text to a file? Pin
Not Active3-May-02 3:58
mentorNot Active3-May-02 3:58 
GeneralASP.NET and image maps Pin
Not Active1-May-02 14:23
mentorNot Active1-May-02 14:23 
GeneralRe: ASP.NET and image maps Pin
Philip Patrick2-May-02 10:15
professionalPhilip Patrick2-May-02 10:15 
GeneralRe: ASP.NET and image maps Pin
Not Active2-May-02 18:08
mentorNot Active2-May-02 18:08 
GeneralHelp Required with ADO on ASP Pin
simonjackson@att.net1-May-02 9:43
simonjackson@att.net1-May-02 9:43 
GeneralRe: Help Required with ADO on ASP Pin
Nick Parker1-May-02 10:48
protectorNick Parker1-May-02 10:48 
GeneralRe: Help Required with ADO on ASP Pin
Philip Patrick1-May-02 22:52
professionalPhilip Patrick1-May-02 22:52 
GeneralIP Address Pin
Statbat30-Apr-02 7:31
Statbat30-Apr-02 7:31 
GeneralRe: IP Address Pin
Jason Jystad30-Apr-02 12:01
Jason Jystad30-Apr-02 12:01 
GeneralRe: IP Address Pin
Fernando Finelli3-May-02 4:51
Fernando Finelli3-May-02 4:51 
GeneralLoadControl Pin
Jamie Nordmeyer30-Apr-02 7:00
Jamie Nordmeyer30-Apr-02 7:00 
GeneralRegular Expression messing about Pin
Chris Maunder29-Apr-02 21:12
cofounderChris Maunder29-Apr-02 21:12 
GeneralRe: Regular Expression messing about Pin
Andrew Peace30-Apr-02 1:38
Andrew Peace30-Apr-02 1:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.