Need Help ASAP - Willing to Pay

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....
 
C

Cor

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
 
S

scorpion53061

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.
 
C

Cor

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
 
W

William Ryan eMVP

Scorp:

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

scorpion53061

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!!!
 
T

Tom Winter

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.
 
S

scorpion53061

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.
 
C

Cor

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top