HeatherO was telling us:
HeatherO nous racontait que :
> Hi Jean-Guy,
> I tried your suggestions and it creates the other document but it
[quoted text clipped - 15 lines]
> source document and I haven't even tested it to see what it prints.
> Any suggestions??
Heather, is English your mother tongue?
If not, then you need to learn to write short simple sentences that are not
full of irrelevant details. Also, you need to organize your thoughts so that
they make sense to your reader.
If it is, you need to brush up on writing techniques.
Please, read your paragraph again as if you were doing so for the first time
(as it was the case for me):
> I have document A on document A I have the date: client account:
> address: then I have a table containing data and then a second table
> containing data and then I have a underline with the client's name
> underneath. (The date, account address and data in the table I am
Finally, end of the first sentence.
It is difficult to figure out what you are talking about. "I have document A
on document A..." ???
Is the content of Document A relevant to the problem you are trying to
describe? As I found out later, after trying to understand what this content
was, it is absolutely not relevant. Then don't mention it!
> grabbing from an excel file). What I am trying to do is based on the
> client's account create this source document. When I am finished
Here it seems that document A is what you call the "source document". If you
are building it on the fly from Excel, then it is hardly a source document.
Before the macro started, it did not exist. It seems to be more like some
kind of temporary document.
> client A's account form I want to open the testZ document and copy
> the source document to testZ with all of client A's information.
I guess that testZ already exists? What does it contain? Or is it a blank
document you are also creating on the fly?
> Then I am going to get client B and dump his info into the source
> document and then copy the source document back to testZ document
What source document? Document A from before? Or another new document you
created on the fly?
> after client A's information so when I print it finally it will print
> all the information. So in a way it's kind of like a mail merge.
> Right now I get all the data dumped on top of each other in the
> source document and I haven't even tested it to see what it prints.
So, if I understand correctly, you build a temporary document and dump the
data from this temp document into a final document. Then you build another
temporary document and append this document to the same final document. And
son for x numbers of temporary document. Right?
Then the code I provided earlier will work. I think you just have to sit
down, relax and figure out which document is which.
Do you need to keep those temporary documents (Document A from =your text)?
If not, it is even easier. Build it from a template, append its range to the
final document and discard it. Create a new one, append it to the final
document before discarding it, etc.:
'_______________________________________
Dim TempDoc As Document '"Document A"
Dim TargetDoc As Document 'testZ
Dim TempRge As Range
Dim TargetRge As Range
'Start some kind of loop to cycle through your Excel data chunks
Set TargetDoc = Documents("testZ.doc") 'Already opened by some earlier code
Set TargetRge = TargetDoc.Content
Set TempDoc = Documents.Add("C:\MyTemplate.dot")
'Fill TempDoc with its data...
Set TempRge = SourceDoc.Range
TempRge.Copy
'Add some code to handle the first insertion so as to
'avoid a section break before the first data chunk
With TargetRge
.Collapse wdCollapseEnd
.InsertBreak wdSectionBreakNextPage
.Collapse wdCollapseEnd
End With
TargetRge.Paste
TempDoc.Close wdDoNotSaveChanges
'loop
Set TempDoc = Nothing
Set TargetDoc = Nothing
Set TempRge = Nothing
Set TargetRge = Nothing
'_______________________________________
Please, read what Jezebel had to say in response to your later post in this
group.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
HeatherO - 09 Mar 2005 16:09 GMT
Jean-Guy, thanks for your contructive comments. I'm glad it made you feel
better to attack me with comments like "is english my mother tongue". I have
no use for this kind of help. I believe someone once said "there are no dumb
questions". However I am obviously at the wrong place for that.
Heather
> HeatherO was telling us:
> HeatherO nous racontait que :
[quoted text clipped - 116 lines]
> Please, read what Jezebel had to say in response to your later post in this
> group.
Jean-Guy Marcil - 09 Mar 2005 18:49 GMT
HeatherO was telling us:
HeatherO nous racontait que :
> Jean-Guy, thanks for your contructive comments. I'm glad it made you
> feel better to attack me with comments like "is english my mother
> tongue". I have no use for this kind of help. I believe someone
> once said "there are no dumb questions". However I am obviously at
> the wrong place for that.
> Heather
Sorry you took it the wrong way. How/where did you get the impression It
made me feel better to write what I did? Believe me, if I felt I needed to
relieve myself in some way, I would have been way more aggressive and would
not have even tried to help. In fact, my whole post was about helping. I
tried to show you why it is important to consider your reader in a forum
such as this one, and then tried to provide help regarding your problem.
I tried to be constructive, no just negative. I did not assume anything
about your mother tongue. Read my post again. I did write that it may have
been one way or the other. I did not imply that it was, but tried to attack
you by writing that it may not have been, thus belittling you. In these
newsgroups we get people from all over the world, and they often use aliases
so we cannot trust the name alone, and for a lot of them English is a second
language (as it is for me), so it is not uncalled for to question whether
English is your mother tongue or not. Also, since you posted from a web
interface, I could not infer where you were from.
I did the best I could. I tried to show you why I thought what I wrote by
commenting directly from what you wrote, not what I thought you meant or
what I thought it was worth. The only time I wrote about what I thought what
your post meant was when I was actually trying to really help you with your
problem by restating your case in my own words, hoping you would confirm if
I got it right or not.
So, I am sorry you did not like my comments regarding your writing style,
but what I wrote remains true. What you wrote was difficult to follow and
made it more difficult to help you. I hope you read the whole post because I
did not just "attack" you as you seem to be thinking I did.
I did provide help and code sample and never inferred that your question was
too dumb to be asked. Please, show me where I wrote that your question was
dumb, and so was not worthy of my time (which is what I think you were
inferring when you wrote " I am obviously at the wrong place for that").
Finally, I do not understand why you took offence at such a realistic
question given the nature of the medium through which we communicate, but
did not find the following comment offensive at all, considering the way you
reacted to my post, you should have reacted in a similar way to this one as
well (Note that I am in no way commenting on the
value/worthiness/quality/nature of the text I am quoting):
<quote>
If you leapt in and starting writing code with an objective as ill-defined
as the spiel you posted, then it's no wonder you and the client are at odds:
you're not clear on where you want to end up; they're not clear on what
<end quote>
You in fact praised it:
<quote>
Thanks for the constructive comments. I'll try to focus and it a little
better.
<end quote>
If you want to keep on writing in a way that makes it very difficult to
understand what it is you mean, you are right, you do not need help such as
the kind of help I tried to provide.
Should you need more help regarding coding, I will be happy to oblige, but
since you do not like comments about your writing style, I will disregard
this aspect of your posts and hopefully be able to provide the actual help
you need.
Good luck to you and your project.

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