Trent was telling us:
Trent nous racontait que :
> Hi,
> I am trying to come up with a system that will allow me to generate a
[quoted text clipped - 25 lines]
> Anybody? Please?
> Thanks.. Trent
One fairly easy painless way of doing this is to store each piece of
information in the template as Autotexts.
Then, connect each textbox to the appropriate autotext. If a textbox is
checked, insert the autotext, if not, don't...
Another way would be to have each piece of text on the template body itself,
marked by a bookmark. Then hide (or delete if this in a one shot deal for
the user) the unwanted bits by using the bookmark collection.
I prefer the first one, but again, it depends on your particulars... I.e,
the second method will not really work if the pieces can be in any order as
dictated by the users. OTOH, a quick and dirty advantage of the second
method is that you can have the userform show up later (with a toolbar
button), and the user can change his mind on what to display, in which case
hide/unhide the necessary bits.
HTH.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Trent - 11 Nov 2004 18:04 GMT
Unfortunately, most all of this is outside of my experience.
I have managed to create a custom dialog box that reads data from a text
file and then creates checkboxes for each entry from the text file.
Then I can drop the selected data into the document easily enough, but as to
placing it in specific locations I am still lost.
Any chance you know where I can find even a very basic sample of doing this?
Once I know how to define the location in the document and pass to it from
the dialog box I should be able to figure out and modify as I go.
I have the added complexity of having to accomodate two columns in the
document where the client is on one side and the spouse on the other and
have to make certain that the time line aligns one side to the next. I
figure it will probably just require a table to keep the related sections in
each column aligned but that is also something I have never done in Word.
:)
Sorry, I am a newbie. I have a lot of programming experience and can figure
things out quickly enough once I have some idea of the best approach in that
particular environment. I work best by dissecting code that does something
similar to what I intend and figuring out how it works.
Thanks for the info.
Trent
> Trent was telling us:
> Trent nous racontait que :
[quoted text clipped - 53 lines]
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site: http://www.word.mvps.org
Jean-Guy Marcil - 11 Nov 2004 18:32 GMT
Trent was telling us:
Trent nous racontait que :
> Unfortunately, most all of this is outside of my experience.
>
[quoted text clipped - 14 lines]
> related sections in each column aligned but that is also something I
> have never done in Word. :)
Play around with this to get you started:
'_______________________________________
Dim MyDoc As Document
Dim RowNum As Long
Dim i As Long
Dim j As Long
Dim MyTable As Table
Dim MyRow As Row
Dim CellRange As Range
Dim InsertTablePoint As Range
Set MyDoc = ActiveDocument
RowNum = 5 'or the number of checked checkboxes
With MyDoc
Set InsertTablePoint = .Paragraphs(1).Range
InsertTablePoint.Collapse
Set MyTable = .Tables.Add(InsertTablePoint, RowNum, 2)
End With
With MyTable
For i = 1 To RowNum
Set MyRow = .Rows(i)
j = 1
With MyRow
For j = 1 To 2
Set CellRange = .Cells(j).Range
CellRange.Text = "Text # " & i & " - " & j & "."
Next
End With
Next
End With
MyDoc.UndoClear
Set CellRange = Nothing
Set MyRow = Nothing
Set MyTable = Nothing
Set MyDoc = Nothing
Set InsertTablePoint = Nothing
'_______________________________________

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org