Reading And Writing To Miscrosoft Word File
I have prepared a mail merge application in VB. Now i want the same to convert to ASP. how to go about it. I mean what class need to be used for that.
View RepliesI have prepared a mail merge application in VB. Now i want the same to convert to ASP. how to go about it. I mean what class need to be used for that.
View RepliesHere is what I have setup:
- a form that updates a text file.
- for example, in the form I have two fields, title and story. then, this write to a textfile (i.e. theinfo.asp). the update.asp file looks like this:
TSO.write "<%" & vbCrLf
TSO.write "title = """
TSO.write Request.Form("title")
TSO.write """" & vbCrLf
TSO.write "story = """
TSO.write Request.Form("story")
TSO.write """" & vbCrLf
- so, essentially it is creating an asp file with two variables.
- this works fine, it updates the file and i can call these variables in other pages. however, when i call these variables into a form : old versions of the variables populate the form: Code:
i had a vbscript that will read the text file from the bottom to the top, and after reading the file, it will be displayed in the screen, and the code look like this:
PHP Code: Code:
In ASP, using PerlScript, how do you read and write to files?
View Replies View RelatedI Would like to know the code for reading/writng binary data.
View Replies View RelatedI'm planning a little asp prog that will allow me to read&write .ini files.
meaning, read lines that are:
key=value
and maybe even read from groups (optional):
[group 1]
key1=value1
[group 2]
key2=value2
I am looking for a system that will:
1. Read a message from a POP3 mailbox
2. Parse the message into its parts
3. Create a record in an SQL server table with selected fields of the message
4. Upload the attachements to the filesystem
5. Write the path of the attachements to the SQL server record
For security reasons, I want the process to be initiated and approved
by a user.
Is it possible to read a word document .doc on a server in the same way you can read a .txt file, line by line.
One of our clients creates all their dinner menus in word and they want to display them on their website, I was wondering if I could simply provide them and upload facility and then read through the uploaded document line by line and display it on their website.
Is this possible?
I have a web page that lets the user to upload a word document. Currenlty this document is stored in the SQL Server database. The Field where this doc is stored is of Image Type.I am using aspSmartUpload object To do so. all is working fine till now.
Now I want to Write this document Into a textarea. I tried Using BinaryWrite, but to no avail.
Is it possible to use ASP to:
1. search a directory for Word documents
2. scan the Word documents that were found for a desired keyword
3. return the path of the word documents containing the keyword
It will only be searching for files on the local network.
Or does anyone know of a way to do this other than ASP?
I have written a program where according to my query all the ouput is written to the text file. I want to add 3 lines to my text file which are needed so that it can be exported into outlook. Code:
View Replies View Relatedhow can i write to a file and save to it by coding.
View Replies View RelatedWe have an existing ASP app that is doing a very simple form submission to an Access db. So it opens a connection does a write and closes the connection.
The problem is that every other form submission is failing because of an "Unspecified Error" - according to our IIS web server log.
I have 2 things I'd like help with.
1) Writing to a log file:
I'd like to write to a log file (either the web servers or a different one) from the server side code within the ASP app. So, once the code opens the DB connect I would like to know it was a success. Once it writes, I want to see the string its trying to put in, etc...
How would I do this in our ASP/IIS environment?
2) Catch errors:
If I'm opening a db connection to this access db, how can I be sure the connection is a success? does a value get returned that would indicate success/failure? if so how do I capture it?
I'm speaking of some type of try-catch system.
is there another approach I should be taking to debug this problem?
Im using this code to write information to a .txt file :
Dim objFSO, objTextFile
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile("C:Domainsattle-hq.comdbaction_log.txt", True)
objTextFile.WriteLine("This line is written using WriteLine().")
objTextFile.Close
Code:
im writing an asp code to extract data textfiles from the server using FSO, but when I run the script the file were save at the server drive(c not on my local drive
View Replies View RelatedCan I write to a binary file from a VB script?
I get a syntax error:
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/Web2_Local/custquery.asp, line 180, column 21
Open "DOWNLOAD.FIL" For Binary Access Write As #1
I'm using the following to write a file :
filename = server.mappath(session("Directory") & "/Text/" &
ExportFileName)
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Set MyFile = ScriptObject.OpenTextFile(filename,2,true)
Myfile.writeline exportString
MyFile.Close
I'm putting tabs in the exportString the C way e.g. " " but they come out
in the text file literally. How does one write a tab to a file with asp? (I
don't want an HTML tab!)
I am a web developer that deals with reporting.I am trying to make a print application so i can choose a few reports and then print them.I tried to do the window.print() but i don't want the print dialog box to come up.I am going to try and print from the server using WSH.
is that i need to write what is on my page to a file.The pages are dynamically created and have many tables on them.Is there a way to write the page that i am displaying to a file while keeping the formating intact.
How can I, or is it possible to create a file with a .htm extention and have includes within that file? I am trying to do so through the following code but nothing is happening when I view the newly created file.
dim fs
dim file
set fs = CreateObject("Scripting.FileSystemObject")
set file = fs.CreateTextFile(path & newFileName & ".htm", true)
file.WriteLine("<!-- #include file='header.htm'-->")
file.Close
This creates the new file but when I try to view it, the header information is not included, so how can I accomplish this?
I have an asp page that is supposed to write text to a text file. I know how to write to a text file using Server.MapPath, but how to I write to a file that is on another server?
View Replies View RelatedI have a form that submits an order and it sends it to the visa site and they get the info, but my problem is I get the info back from them with the amount of the order but I don't know what they purchased and the quantity.
What I want to do is on my page is also have it write to a text file on my server, but I am not sure how to do that? I have text fields and radio buttons on my site what I want it to do on submit is also write the info to a text file so I have the customers information as to what they purchased and the quantity.
Is there a way to have it submit to the CC company and write to a text file at the same time using asp code? do I need to write a loop of somekind?
I have a routine I'm writing to read the contents of a file and modify it. However the file will not parse properly into an array, so I strongly suspect I'm using the wrong character to parse the file. The line of code that is supposed to parse the file is:
arrLines = Split(sFileContent, vbCRLF)
When I view the array, it appears as one continuous line, but when I open the file in a file editor it's very clear there are 15 lines.
I've got a league standings file that gets uploaded as an xls file. To display the contents, I'm not sure what the most efficient way is:
1.) Import the xls file into a database every time the file is updated
2.) Read the contents of the xls file using OpenDataSource or OpenRow Set
3.) Something I haven't thought of yet!
I've to got a login script, but in the middle of the verification script, I'd like once the vify has been ok'd to look for a sql file, that has insertion data in it, once the file has been found the asp code must read and carry out the sql command (insert the data in the access db), once done the sql file gets deleted. Code:
View Replies View RelatedIm having a bit of trouble with taking a csv file and sperating each row with a "," because we all know that csv's are serpated by cammas, my problem is the rows are getting messy because say I have for the first Collum "Toy, Really fast", it will seperate the collum name because of the , Is there any way I can remove these or whats the best way.
Heres my code right now: Code:
I am developing a web page, in that i have to get user's photo from user and insert it in to database. how to upload this photo from local drive to my server
View Replies View RelatedI am trying to read in an XML file I don't know the node/structure,so I basically just want to load in the file and then print out the entire file on the page through Response.Writes. how do I loop over the nodes if I don't know the names?
View Replies View Relatedi want to 'grab' an rss news feed from a public site that has the xml file published on an hourly basis. how do i do this in asp?
View Replies View RelatedI am new to working with ASP and I would like to know
the code to create a textfile on the serer and then write
something in it using ASP.
I'm writing data from an access db to a text file then emailing the text file. Everything works fine but it needs to tab deliminated. Can some one post the code for a "tab"?
View Replies View Relatedhow to write (String data) to a text file from an ASP page?
View Replies View RelatedI would like to create a file on the hosting server (if it doesn't exist yet), then I would like to write some error information into it. Finnaly I would like to retreive that information later.
View Replies View RelatedCan this be done? For example, in the line below. There may not always be a & objRS("ShippingAddress2") and I'm wondering if there is a way to use an if/then in there some how. If there is no data in that field then I need to pass over this part completely & objRS("ShippingAddress2") & "|"
I'l have several instances where I need to do this Code:
fname.WriteLine("hd2|" & objRS("ShippingName") & "|" & objRS("ShippingAddress") & "|" & objRS("ShippingAddress2") & "|")