W3C home > Mailing lists > Public > www-html@w3.org > October 1999

Urgent !! (Help)

From: LOKESH CEEBA <cvloki@hotmail.com>
Date: Fri, 01 Oct 1999 18:32:36 GMT
Message-ID: <19991001183243.36490.qmail@hotmail.com>
To: www-html@w3.org
Can anyone help me in generating HTML outputs using macros.
Basically to automate creation of HTM files.
I've this HTML script and several other HTML scripts, but need to generate 
the page using macros.
Open for any alternate suggestions.

Thank you in advance and help is greatly appreciated

a sample HTML file in a macro script:

Sub Main()
  dim l_month as integer
  dim l_year as Integer
  Dim l_quarter as string
  Dim my_file As Record, recordno
  l_year  = Year(Now)
  l_month = Month(Now)

  if (l_month = 1 or l_month = 2 or l_month = 3) then
    l_quarter = "4th"
  end if

  if (l_month = 4 or l_month = 5 or l_month = 6) then
    l_quarter = "1st"
  end if

  if (l_month = 7 or l_month = 8 or l_month = 9) then
    l_quarter = "2nd"
  end if

  if (l_month = 10 or l_month = 11 or l_month = 12) then
    l_quarter = "3rd"
  end if
   open "c:\macro-outputs\macgen.html" for Output as #1
   write #1, "<HTML>"
   write #1, "<HEAD>"
   write #1, "<TITLE>Level2</TITLE>"
   write #1, "<FONT SIZE=2><P>&nbsp;</P>"
   write #1, "<P>&nbsp;</P>"
   write #1, "<P>&nbsp;</P>"
   write #1, '<HTML>'
   write #1, "</FONT><FONT FACE='Arial' SIZE=6><PIGN='CENTER'>LEVEL 2</P>"
   write #1, "<P>&nbsp;</P>"
   write #1, "</FONT><FONT FACE='Arial' SIZE=5><P>"
   write #1, l_quarter + " Quarter " + cstr(l_year) + " Workforce 
Demographics Reports</P>"
   write #1, '</HEAD></HTML>'
   write #1, "<P><A<FONT FACE='Arial' SIZE = 4></FONT></A></P>" + chr(10)
   write #1, "Report Summary</FONT></A></P>"
   write #1, <P><A HREF='Level3_awd.htm'><FONT FACE='Arial'>Alliance 
Workforce Demographics (excluding Petroman and Starstaff)</FONT></A></P>
   write #1, <P><A HREF="file:///C:/MACROS/Level3_ewd.htm"><FONT 
FACE="Arial">Equilon Workforce Demographics (excluding 
Petroman)</FONT></A></P>

Rem alternately......

   Open "c:\macros\level2.txt" For Random As #1 Len = len(my_file)
   Get #1,,my_file
   my_file = "c:\macro-outputs\macgen.html"
   Write #1,,My_file
   'Close before reopening in another mode.
    Close #1
end sub


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Received on Friday, 1 October 1999 15:21:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:40 GMT