Need Help ASAP - Willing to Pay

  • Thread starter Thread starter scorpion53061
  • Start date Start date
S

scorpion53061

I have a time critical function I need assistance with.

You should be familiar with windows forms, ADO.NET and MS Word Automation.

If you are interested please email me at

(e-mail address removed)

remove the nospamhereplease

Thanks....
 
Hi Scorpion,

Look what you can do with this code.
Reason HTML you want it fast, this is fast.
I made it after I saw your message so there is not any thing done to make it
look nice.
It is not that much work to let it show nicer.

Public Module main
Public Sub main()
'First the testtable
'As Scorpion wishes a dataset
'Make a datatable with 8 columns
Dim ds As New DataSet
Dim dt As New DataTable("scorpion")
For i As Integer = 0 To 7
Dim dc As New DataColumn(Chr(i + 48))
dt.Columns.Add(dc)
Next
'And 12 rows every column filled with a letter
For i As Integer = 0 To 11
dt.Rows.Add(dt.NewRow)
For y As Integer = 0 To dt.Columns.Count - 1
dt.Rows(i)(y) = Chr(y + 65)
Next
Next
ds.Tables.Add(dt)
----------------------------
Above is to make the test dataset.
----------------------------
Dim Scorpion As New ArrayList
For i As Integer = 0 To ds.Tables("scorpion").Rows.Count - 1
Dim row As New System.Text.StringBuilder
Scorpion.Add(row)
row.Append("<TR><TD>")
For y As Integer = 0 To ds.Tables("scorpion").Columns.Count - 1
row.Append(ds.Tables("scorpion").Rows(i)(y).tostring)
If y <> ds.Tables("scorpion").Columns.Count - 1 Then
row.Append("</TD><TD>")
Else
row.Append("<TD></TR>")
End If
Next
Next
Dim sw As New IO.StreamWriter("C:\Scorpion.html")
sw.WriteLine("<HTML><HEAD></HEAD><BODY><TABLE>")
For i As Integer = 0 To Scorpion.Count - 1
sw.WriteLine(Scorpion(i).ToString)
Next
sw.WriteLine("</TABLE></BODY></HTML>")
sw.Flush()
sw.Close()
End Sub
End Module
 
Hi Cor,

The problem is I have to access to the other Word Library elements. I
currently have been doing HTML but the boss is complaining it does not look
"professional enough.". Page breaks among other things are a real problem in
HTML.

I am dumbfounded this has proved so difficult in automation. Excel was
relatively easy for me to do.
 
Hi Scorpion,

Why not make the thing your Boss want to have in Word,

Save it to HTML

Look what extra tags or whatever there are and paste those in this sample

That is what I would do.

Cor
 
Scorp:

What's up. Drop me a line and I'll see if I can help...no money necessary.
 
Cor,

I can't do headers, footers, indents, many of the fields I need, and such in
HTML......Or if I can, it is beyond my abilities.

If you know of a solution, (you know how long I have been dealing with this
issue) I would loe to hear it!!!
 
Hi Scorp,

Save your word document as HTML.

Open it with notepad

Copy all starting things in my sample where is the start < Head> etc. till
you need the table, take the <table ....> with it because that gives the
format of the table. (And delete the old tags)

(It can be one long string because HTML has no line breaks)

Than you take the end and you past that in the part where I did put the
ending line </table></head>.

I suspect that than your sample document is there (after some corrections)
as you wish it,

(And after you correct my sample table to the right size).

Cor
 
If your boss wants header and footers for each page in an HTML document,
then he doesn't understand what HTML documents are. HTML documents are one
long continuous stream. They really aren't/can't be formatted with
page-specific type stuff. If this document is meant to be printed out and
look very professional with custom header and footers, when it ought to be
done in Word. Word documents are much better suited to that. If this is
something he wants done on-line, do it in Word and save it as a PDF file.
 
aieeeeeeeee

That is what he is saying. He wants it in Word. Some folks were under the
impression I could get by on this with HTML and that just does not cut it.
 
Hi Scorpion,

You know how to handle Interop,

Do you think that your boss sees it when you do it in HTML as a tempfile,
open thats and save that as a Doc?

Cor
 
Back
Top