By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,480 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,480 IT Pros & Developers. It's quick & easy.

include file within script

P: n/a
I have the below code to auto-email a customer.

What is the syntax to include a file in the email? <!--#include
file="agreement_inc.asp" -->

HTML = HTML & "...just some text...<br>"
HTML = HTML & <!--#include file="agreement_inc.asp" -->
HTML = HTML & "</body>"
HTML = HTML & "</html>"

thanks
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"shank" <sh***@tampabay.rr.comwrote in message
news:eR**************@TK2MSFTNGP04.phx.gbl...
>I have the below code to auto-email a customer.

What is the syntax to include a file in the email? <!--#include
file="agreement_inc.asp" -->

HTML = HTML & "...just some text...<br>"
HTML = HTML & <!--#include file="agreement_inc.asp" -->
HTML = HTML & "</body>"
HTML = HTML & "</html>"

thanks
sIncludeFile = "somefile.txt" ' modify as appropriate
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
set fRead = oFSO.OpenTextFile(sIncludeFile)
sReadText = fRead.ReadAll
fRead.Close
set fRead = nothing
set oFSO = nothing

HTML = HTML & "...just some text...<br>"
HTML = HTML & sReadText
HTML = HTML & "</body>"
HTML = HTML & "</html>"

HTH,

- Bob.
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.