CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 how to launch a word document

Print topic Send  topic

Author Message
Fernand St-Georges
Posted: 10/10/2005, 1:30 PM

I would like to launch a Word document directly from an Asp page. What is
the trick

thanks
Fern

peterr


Posts: 5971
Posted: 10/10/2005, 1:37 PM

You can create a link in HTML (no ASP code needed) that points to your MS Word document.
Or redirect users from your ASP page to another location, which would be your Word document.
Or create a JavaScript that opens a window with another URL (your MS Word document). Although this may be difficult to automate because most people disable automated pop-ups.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Walter Kempees
Posted: 10/10/2005, 2:13 PM

Without being .........
If you want the document to be opened in the users environment by the
appropriate reader
(Word, RTF, Excel, PDF) you will have to supply the MIME-type
We store in a table the filename, mimetype and content of an uploaded
'object'.
If anothere user opens it, we use this function, presenting the data
(blobdata) in the tool the user has available on his/her system.
for instance a word document will be opened by Word or any other RTF editor
available.
  
  
function show() {  
  
if ($pda_data = $this->db->getRow('select filenaam, mimetype, blobdata from   
documentarchief where id='.getUrlVar('id'))){  
if ($this->db->isError($pda_data)) fatalError($pda_data);  
} // end if  
  
header("Pragma: public");  
header("Expires: 0");  
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");  
header("Content-type: " . $pda_data['mimetype']);  
header("Content-Disposition: attachment; filename=". $pda_data['filenaam'].   
";");  
echo $pda_data['blobdata'];  
  
}  
  

sorry this is not CCS but can be adapted.

Walter


"peterr" <peterr@forum.codecharge> schreef in bericht
news:6434ad0fae26eb@news.codecharge.com...
> You can create a link in HTML (no ASP code needed) that points to your MS
> Word
> document.
> Or redirect users from your ASP page to another location, which would be
> your
> Word document.
> Or create a JavaScript that opens a window with another URL (your MS Word
> document). Although this may be difficult to automate because most people
> disable automated pop-ups.
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 10/10/2005, 2:40 PM

Walter,
I'm not sure why would you want to do all this, instead of simply pointing to an URL with the .doc document, like Google does?:
http://www.google.com/search?hl=en&lr=&q=word+document+inurl%3A.doc
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Fernand St-Georges
Posted: 10/10/2005, 2:55 PM

well, if I only include a link pointing to the Word document (
d:\MODELE.doc ), an alert message indicates "d is not a registered protocol"

"peterr" <peterr@forum.codecharge> a écrit dans le message de news:
6434adfcde0015@news.codecharge.com...
> Walter,
> I'm not sure why would you want to do all this, instead of simply pointing
> to
> an URL with the .doc document, like Google does?:
> http://www.google.com/search?hl=en&lr=&q=word+document+inurl%3A.doc
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Walter Kempees
Posted: 10/10/2005, 3:18 PM

Well, I did start off with "Without being....".
We mainly use this because :
a) it gives the browser a clean understanding what to do with the data.
b)we store uploaded documents, spreadsheets and so on right in the database.
giving us the opportunity to distribute documents to every user on every
server connecting to our database, saving us a lot of replication of
documents over several webservers in order to link to a document.
Although this is a debatable method (check the various discussions in the
fora concerning speed, database size and so on), it's the method we choose
to use. also eliminating possible file hacking.
If data is in a blob, you'd need a way to recreate the original document in
the users browser.
Please note we do use it for word documents, excelsheets, fax messages,
scanned passports and so on. (yes even png, jpg, and gif).

The direct linking method as presented does deliver the same result, but IMO
only for files in the filesystem.
With respect,

Walter






"peterr" <peterr@forum.codecharge> schreef in bericht
news:6434adfcde0015@news.codecharge.com...
> Walter,
> I'm not sure why would you want to do all this, instead of simply pointing
> to
> an URL with the .doc document, like Google does?:
> http://www.google.com/search?hl=en&lr=&q=word+document+inurl%3A.doc
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

wkempees
Posted: 10/11/2005, 4:08 PM

Any progress/comment?
peterr


Posts: 5971
Posted: 10/11/2005, 5:05 PM

Fernand,
You cannot give Internet users the access to your hard-drive. You should put the document on the Web just like any other files, images, etc.
Or you can use Walter's method to serve the document if you understand how it works - there should be similar ASP examples on the Web.

Walter,
I agree that this is not a bad method.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
murrayp

Posts: 2
Posted: 12/07/2005, 12:40 PM

Wlater, I found your posting here interesting in that you are working with a sql database. Do you have any example code (preferably in asp) that allows the creation, editing and saving of documents to and from a SQL database?

I am looking for a solution that creates a document from fields on the database or allows a user to create a new documrent or uploads it using the upload from codecharge, stores it to a SQL database, allows modification of the document by creating a new document, modifying it and saving it again as a new version. (Thus allowing version control)

Any help would be much appreciated and I am happy to pay a fee for code that works. I am working in asp with MSSQL

Murray
View profile  Send private message
Walter Kempees
Posted: 12/07/2005, 1:29 PM

Murray
I assume you adressed me.

Hum, well can supply the MySQL table definition that works.
I can supply PhP upload that works.
Also the PhP that properly displays the document according to MIME type.
The version release is actually the simplest of them all.
I can also give you access to one of our applications, supplying you with a
road map 'cause it's in Dutch to give a feel.
The above application and scripts are not CCS though, but a binary upload in
CCS PhP I have already done.

Just on a careful note ASP is not my merit and by watching the threads on
FileUpload components and the likes, I actually stay with PhP.
(Luckily one can through htaccess accept any *.asp while actually running
PhP scripts, sorry joking)

I'll watch the this topic for a reply. Am out-of-office tomorrow so will be
Friday earliest.

Walter


"murrayp" <murrayp@forum.codecharge> schreef in bericht
news:6439748d4a5508@news.codecharge.com...
> Wlater, I found your posting here interesting in that you are working with
> a sql
> database. Do you have any example code (preferably in asp) that allows
> the
> creation, editing and saving of documents to and from a SQL database?
>
> I am looking for a solution that creates a document from fields on the
> database
> or allows a user to create a new documrent or uploads it using the upload
> from
> codecharge, stores it to a SQL database, allows modification of the
> document by
> creating a new document, modifying it and saving it again as a new
> version.
> (Thus allowing version control)
>
> Any help would be much appreciated and I am happy to pay a fee for code
> that
> works. I am working in asp with MSSQL
>
> Murray
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

dataobjx


Posts: 181
Posted: 12/08/2005, 5:46 AM

An example of how to store documents within a database are provided in one of the CCS Developer Magazines (both asp and php code samples are provided).

To purchase and download the magazines and source code, go to http://www.dataobjx.net.

If you are not already registered, you will need to register then go to the online store.

After purchasing the magazines, they will be made available to you in your in-box.
_________________
www.DataObjx.net
www.mydigitalapps.com
View profile  Send private message
Walter Kempees
Posted: 12/08/2005, 12:44 PM

Murrayp,

Dataobjx offer is endorsed by us.
Quality and usability high, price low.
But most of all ASP!
Walter


"dataobjx" <dataobjx@forum.codecharge> schreef in bericht
news:6439839400fa49@news.codecharge.com...
> An example of how to store documents within a database are provided in one
> of
> the CCS Developer Magazines (both asp and php code samples are provided).
>
> To purchase and download the magazines and source code, go to
> http://www.dataobjx.net.
>
> If you are not already registered, you will need to register then go to
> the
> online store.
>
> After purchasing the magazines, they will be made available to you in your
> in-box.
> _________________
> www.DataObjx.net
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

murrayp

Posts: 2
Posted: 12/08/2005, 7:27 PM

Walter, thanks. I have registered and downloaded the magazines and will go through the code and review.
Murray
View profile  Send private message
Rene S
Posted: 12/09/2005, 12:59 AM

Hi all, and, in this case Walter and Dataobjx especially,

Walter you mentioned that Dataobjx is endorsed by you. What does that mean exactly? Is dataobjx owned by Yessoftware, or is it totally seperate?

Just want to know who is behind it, and if it is worth getting signed up etc.

Thanks

Rene S
Walter Kempees
Posted: 12/09/2005, 1:10 AM

Rene S
As far as I know there are no commercial ties between Yes and Dataobjx.
Nor between any of them and me/us.
With Endorsed, I meant exactly what I wrote, Good useful nicely presented
stuff in an e-zine, contributed to by many from this forum as well.

They started the initiative to maintain a monthly CCS Magazine, I don't know
what the status is right now.
In general, and without critisism, users in Fora the world over help
eachother, as long as it's free.
A paid magazine is then a struggle.....
Hope this helps,

Walter
http://forums.codecharge.com/posts.php?post_id=54114
http://forums.codecharge.com/posts.php?post_id=56695

<ReneS@forum.codecharge (Rene S)> schreef in bericht
news:64399475e9dfb0@news.codecharge.com...
> Hi all, and, in this case Walter and Dataobjx especially,
>
> Walter you mentioned that Dataobjx is endorsed by you. What does that mean
> exactly? Is dataobjx owned by Yessoftware, or is it totally seperate?
>
> Just want to know who is behind it, and if it is worth getting signed up
> etc.
>
> Thanks
>
> Rene S
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.