Delete a blank line between two tables

N

NJ

There is a blank line between two tables (top to bottom); how do I delete
this line so the two tables would look like a single table?
 
J

Jean-Guy Marcil

NJ was telling us:
NJ nous racontait que :
There is a blank line between two tables (top to bottom); how do I
delete this line so the two tables would look like a single table?

You might want to get into the habit of providing as many details as
possible to help the volunteers that try to answer question in the groups
understand what it is you are actually trying to do.

In this case, do you mean by code?
I will assume yes, since this is a vba group
(But this is not always the case, many people
do not realize that this is a vba group, or even know what vba is.)

Also, how will the code know which ¶ to delete? Between the first and second
table? At the cursor? Between the last two tables in the document?

And sometimes, it is a must to know the Word version, so it should always be
mentioned.

Now, assuming you want to delete the ¶ between the first and second table in
the document, try this code:

Set rgeTable = ActiveDocument.Tables(1).Range

With rgeTable
.Collapse wdCollapseEnd
.MoveEnd wdParagraph
.Delete
End With

Of course, if there is more than one paragraph after the first table (before
the second), then this code will not delete everything.


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jezebel

You can delete everything between two tables using --

With ActiveDocument
.Range(.Tables(1).Range.End, .Tables(2).Range.Start).Delete
End With
 
S

Stefan Blom

But note that if you delete everything between two tables the result
will be one table.

--
Stefan Blom
Microsoft Word MVP


in message
 
N

NJ

Jezebel,
Thanks, this is exactly what I needed. It has solved two problems at the
same time; removed an exrea line between two tables to become a single table
as well as column width problem between the two tables that I posted earlier
and received a brainless answer from Jean-Guy Marcil.

Jean-Guy Marcil,
I think you need a little education before answering any postings:
1. Do not answer if you don't understand a posting
2. A negative answer to a previous posting doesn't mean that there won't be
a positive solution.
3. I have read your replies to others; you are pathetic.
 
N

NJ

Yes, this has been my prime goal and here is the reason:
I have two tables; first one contains only the headers and the second table
contains actual data. They are both macro drive and generated dynamically.
Removing an extra line was not really a big deal but my main problem was
when I extended or shrunk a colum on either header or the data table; the
vertical lines are no longer aligned between these two tables. I have posted
my question related to this problem twice in this newsgroup and received
negative answers. Jezebel's solution fixed all the problems when two tables
merged into one and the alignment issue between two tables are automatically
gone.
 
J

Jean-Guy Marcil

NJ was telling us:
NJ nous racontait que :
Jezebel,
Thanks, this is exactly what I needed. It has solved two problems at
the same time; removed an exrea line between two tables to become a
single table as well as column width problem between the two tables
that I posted earlier and received a brainless answer from Jean-Guy
Marcil.

Jean-Guy Marcil,
I think you need a little education before answering any postings:
1. Do not answer if you don't understand a posting
2. A negative answer to a previous posting doesn't mean that there
won't be a positive solution.
3. I have read your replies to others; you are pathetic.

You are certainly entitled to your opinions, but, for others that may not
have seen the other post your refer to I will paste them here whole with
their reply and let those readers decide who is brainless and pathetic (note
that I use here the exact words you did in this post, I ever intended to
insult you and I was always polite and tried to be helpful, regardless of
what you may think):

_______________________________________
2006-08-18 14:24
NJ
Protect Columns' Width
How do I protect column width of a table so the user won't be able to change
the width?

2006-08-18 17:55
Jexebel
Re: Protect Columns' Width
You can't.
_______________________________________

_______________________________________
2006-08-18 16:38
NJ
Fixed Column Width
How do I protect column width of a table so the users won't be able to
expand
or shrink column size?

2006-08-19 10:27
Cindy M.
Re: Fixed Column Width
Word doesn't really provide any option for something of this nature. You
could
only do it by applying some kind of protection to the entire document, but
that
will lock out certain editing features (depending on the version of Word).

Beyond that, all you could do would be to check the column when saving or
printing or whatever and reset the column width then.
_______________________________________

_______________________________________
2006-08-21 10:29
NJ
Protected Column Width
How do I protect column width of a table so the users won't be able to
expand
or shrink column size?

2006-08-21 10:52
Jean-Guy Marcil
Re: Protected Column Width
On the 18th and 19th of this month you asked the exact same question.

You got two replies:

You can't

You can't, except if you protect the document for form, which will lead
to a bunch of undesirable side effects.
Or have code to check before printing or saving.

Do you think Word has changed that much in the last three days, or where you
unable to find the replies to your own questions?
_______________________________________

And finally this thread, in which I politely reminded you that you should
provide more details and offered a solution to the exact question you asked.
My solution should work just as well as Jezebel's if all you have is a
single ¶ between the tables and will also fix this second problem you never
mentioned in any of your posts that suddenly appeared in your reply here).
Also, you seemed to imply that you already asked about that particular
problem but in fact never did and I certainly never even tried to address
this particular problem, so you cannot claim that my answer was brainless
since it never addressed that problem (the one regarding the column width
not matching in separate tables when they are brought together as one).

Good luck.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jean-Guy Marcil

Jean-Guy Marcil was telling us:
Jean-Guy Marcil nous racontait que :

post, I ever intended to insult you and I was always polite and tried

Oooops!
Of course, I meant to write "never" and not "ever"!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
R

Russ

NJ,
Jezebel,
Thanks, this is exactly what I needed. It has solved two problems at the
same time; removed an exrea line between two tables to become a single table
as well as column width problem between the two tables that I posted earlier
and received a brainless answer from Jean-Guy Marcil.

Jean-Guy Marcil,
I think you need a little education before answering any postings:
1. Do not answer if you don't understand a posting
I don't think you understood your own problem...
2. A negative answer to a previous posting doesn't mean that there won't be
a positive solution.
....because the answers given to what you *did* post, didn't change in
veracity.
3. I have read your replies to others; you are pathetic.
Being helpful is not pathetic, being helpful is altruistic!
 
H

Helmut Weber

Hi everybody,

if we would not reply to postings
we don't fully understand at first attempt,
the answers here and the solutions provided finally
would be half as many as best.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
N

NJ

I have been helping many Newsgroups for years and many times I was unable to
understand the postings(questions); we must have a positive attitude and
willingness to help even if a posting is ambiguous.

There are three different ways you can help these postings regardless of its
ambiguity:

1. Answer, if you understand the question.
2. Ask questions, with positive attitude if you don't understand the
posting, but, do not insult.
3. Don't answer, if you don't understand the posting or don't have the
answer.

If you read the last two lines of comments on Jean-Guy's reply, it's rude. I
have noticed the same attitude on his replies to others.

Below is a sample posting for another user and a reply to the posting:

*************************

Subject: RE: Auto populate a field with a phone number 8/24/2006 5:03 AM
PST

By: Naveen In: microsoft.public.word.vba.general


I can't understand.


Post clearly.
 
T

Tony Jollans

NJ .. I would address you be name but you hide behind a moniker ..

These are public forums. Anybody - with any attitude - can come and post
here. By and large, however, those with a negative attitude will be ignored.

You seem to be making a persistent and completely unreasonable attack on
Jean-Guy. I have read and re-read his post and can see nothing rude in it at
all and, were I asking questions, I would much prefer a response like his
over the abrupt "I can't understand. Post clearly" which you cite apparently
as praiseworthy.

I know who I'll be ignoring in future.
 
J

Jean-Guy Marcil

NJ was telling us:
NJ nous racontait que :
I have been helping many Newsgroups for years and many times I was
unable to understand the postings(questions); we must have a positive
attitude and willingness to help even if a posting is ambiguous.

There are three different ways you can help these postings regardless
of its ambiguity:

1. Answer, if you understand the question.
2. Ask questions, with positive attitude if you don't understand the
posting, but, do not insult.
3. Don't answer, if you don't understand the posting or don't have
the answer.

If you read the last two lines of comments on Jean-Guy's reply, it's
rude. I have noticed the same attitude on his replies to others.

Below is a sample posting for another user and a reply to the posting:

*************************

Subject: RE: Auto populate a field with a phone number 8/24/2006
5:03 AM PST

By: Naveen In: microsoft.public.word.vba.general


I can't understand.


Post clearly.


NJ, you seem to think that I purposely insulted you or that I was rude.

This was not my intention, I assure you.



For example, you claim that my last two lines in some reply I posted to you
were insulting. Here are all the last two lines to all the posts I made in
reply to you in the last week:

__________________________________

1.

August 21 2006 - 16:44

Delete a blank line between two tables

NJ

<Question>



August 21 2006 - 17:32

Re: Delete a blank line between two tables

Jean-Guy Marcil

<Snip to last two lines :>

Of course, if there is more than one paragraph after the first table (before
the second), then this code will not delete everything.



August 22 2006 - 09:56

Re: Delete a blank line between two tables

NJ

<Thanks to Jezebel for help provided>

<Insult to myself for perceived rudeness from me>



August 22 2006 - 16:29

Re: Delete a blank line between two tables

Jean-Guy Marcil

<Snip to last two lines :>

since it never addressed that problem (the one regarding the column width
not matching in separate tables when they are brought together as one).

Good luck.

__________________________________



__________________________________

2.

August 21 2006 - 10:29

Protected Column Width

NJ

<Question>



August 21 2006 - 10:52

Re: Protected Column Width

Jean-Guy Marcil

<Snip to last two lines :>

Do you think Word has changed that much in the last three days, or where you
unable to find the replies to your own questions?

__________________________________



Now, this last one can be perceived as rude, I'll give you that. But did you
bother to examine the facts? I may have been slightly rude, at some level,
but posting the same question a third time (totally disregarding your own
double post of a few days previous in the process) is also quite rude. It
either means that you did not bother to look for the two answers you got,
which is very rude for those who provided those answers, or it means that
you found them and instead of asking for a further help or continuing the
discussion, you pretended to ignore them and decided to start over, also
quite rude. But, you may have been unable to find those previous replies,
which is a possibility I included in my reply. Had I left that possibility
out, I would not be writing this lenghty reply, I would long ago have
apologized because than I would have been totally rude. But I still do not
know why you felt you needed to post the same question a third time because
you never addressed that issue, you preferred insulting me instead. I guess,
as Americans are found of saying, this is a free country and this is your
right. But unless you actually address this, I will not bother to reply
anymore in this thread.



This reply of mine came after you posted exactly the same question for a
third time, 3 days after having received one reply to two identical
postings. One short (from Jezebel) and one more elaborate (from Cindy M.).



So, my intention was not to insult you, but to force you to examine your own
posting habits. There is a lot of traffic in the vba.general groups, so it
not helpful for anybody to post the same question more than once, especially
posting the same question 2 hours apart as you did. It just makes for more
traffic and confuses people who search in previous postings for an answer to
a query they may have (which is a great habit).

I am not inferring that you do this sort of thing all the time, but, when I
see this behaviour, after being around these groups for over 5 years, I can
confirm to you that this is not a good thing and that it is frowned upon.
So, once in a while, it useful for the community that these kinds of things
(like multi-postings or UPPER CAPTALS) be pointed out so that all can
benefit.



You may not like my tone, but this does not change the fact that you were a
little trigger-happy in your postings.



Finally, it is regrettable that you decided to attack me in a thread that
had noting to do with your complaints. My perceived rudeness and
brainlessness actually occurred in another thread. This way you managed to
make me look like a fool and side-stepped the real issue. Also, in this
current thread, even if I did not totally understand your question, I was
nothing but constructive and actually offered a solution. Compare your
acceptable example to what I wrote:

<quote>

I can't understand.



Post clearly.

<unquote>



And my version :



<quote>

You might want to get into the habit of providing as many details as
possible to help the volunteers that try to answer question in the groups
understand what it is you are actually trying to do.

In this case, do you mean by code?
I will assume yes, since this is a vba group
(But this is not always the case, many people
do not realize that this is a vba group, or even know what vba is.)

Also, how will the code know which ¶ to delete? Between the first and second
table? At the cursor? Between the last two tables in the document?

And sometimes, it is a must to know the Word version, so it should always be
mentioned.

<unquote>



I think you have to agree that I tried very hard not only to understand (I
did spend some time thinking about your issue), but also to suggest
possibilities of what you meant and present ideas on what you may do in
future postings. Nowhere do I see a negative attitude and an unwillingness
to help. Then I proceeded to offer a solution:



<quote>

Now, assuming you want to delete the ¶ between the first and second table in
the document, try this code:

Set rgeTable = ActiveDocument.Tables(1).Range

With rgeTable
.Collapse wdCollapseEnd
.MoveEnd wdParagraph
.Delete
End With

<unquote>



Why you decided to overlook all that, I do not know.



I will continue to try to help to the best of my abilities and will also
point out "renegade" behaviour whenever I feel it needs pointing out. (Even
if it is very often unintentional, then again, when it is unintentional, if
nobody points it out, how will the "perpetrator" know that it should not be
done?)



Hoping to be able to still assist you with some other future queries you may
have.


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
N

NJ

Jean-Guy,
Here is the answer to your question why I posted the same question twice:
Usually, when a post a same question agin; I always acknowledge that in my
new posting.
My first two exact postings are right next to each other; it was caused by
the Dot Net Passort issue when I typed in an invalid user id. I couldn't find
my posting for the next few days and then I posted my question again. I
couldn't find any of my postings and noticed that none of the postings were
posted after 21st and that's the time when I realized that my URL was causing
postings not to refresh.

The sample posting that I posted previously was just to show that there are
other ways you can handle situations when you are unable to understand a
posting; ask questions related to the posting. You have already realized that
your last comments were probably rude and that was my whole point; I accept
your statement that insulting was not your intention. You seem to be helping
users alot but when you ask questions like "Do you think Word has change that
much in 3 days" then I will certainly not look forward to any responses back
from you.

At the same time, I should not have said what I have said about you. It's
better to ignore rather than attacking; it's never going to be appreciated.
 
J

Jean-Guy Marcil

NJ was telling us:
NJ nous racontait que :
Jean-Guy,
Here is the answer to your question why I posted the same question
twice: Usually, when a post a same question agin; I always
acknowledge that in my new posting.

How can I could I have known what you usually do? I did not remember seeing
the name NJ before.
My first two exact postings are right next to each other; it was
caused by the Dot Net Passort issue when I typed in an invalid user
id. I couldn't find my posting for the next few days and then I
posted my question again. I couldn't find any of my postings and
noticed that none of the postings were posted after 21st and that's
the time when I realized that my URL was causing postings not to
refresh.

Ok, but in the text of that reply of mine that you found so insulting, I
pointed out that this was your third posting. So you knew at that point that
your posts had appeared in the NG.
All you had to do is acknowledged that and right away give a short
explanation. Then that would have been the end of it.
The sample posting that I posted previously was just to show that
there are other ways you can handle situations when you are unable to
understand a posting; ask questions related to the posting. You have
already realized that your last comments were probably rude and that
was my whole point; I accept your statement that insulting was not
your intention. You seem to be helping users alot but when you ask
questions like "Do you think Word has change that much in 3 days"

That was the whole point. That part of the sentence was to jolt you into
action, but again, you still ignore the fact that this was only a part of
the sentence. Do you remember what immediately follows? This was the second
part of the same sentence that infuriated you so much:

", or where you unable to find the replies to your own questions?"

See? I did acknowledge that it was possible that there was a browser
situation (or another set on unknown circumstances) that may have prevented
you from seeing your own double posts or their replies. All you had to do is
acknowledge that and ignore the first part of the sentence because it did
not apply to you. Believe me, it could easily apply to many posters I have
seen in the past. Very often people ask a question, then, a few hours later,
because they haven't had a reply yet, they post again. Or, a few days later
they pretend that the answer they previously got where never posted because
they do not like them and they post again, etc. I am glad that you are not
one of those annoying people.
then I will certainly not look forward to any responses back from you.

Your prerogative.
At the same time, I should not have said what I have said about you.
It's better to ignore rather than attacking; it's never going to be
appreciated.

Well, if you felt "attacked", you had every right to react. But maybe your
particular reaction in this case was a little disproportionate to what had
actually happened.

All you had to do is reply in the appropriate thread *and" acknowledge the
point I was making about your triple-post. Instead, you insulted me,
dismissed an entirely valid reply and did all that in the wrong thread. This
is why I felt I had to write all those long replies.

I feel now that you understand the whole thing better and if you still
choose not to read my replies in the future, then, again, it's a free
country!

Good luck.


By the way, you seem to be using the atrocious interface MSFT provides for
browsing the newsgroup.

If you want reliability, real NG names and ease of access, it is better to
use OE, Forté Agent, 40tude or your favourite newsgroup reader.
They will update much faster and posts are not usually lost (Although I have
heard some people having problem with OE, so Forté might be a better bet if
you want something more solid, but if your ISP is bad, no browser will be
able to make it better!).

p.s. See, I am not such a bad guy... I am still trying to help! ;-)

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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