
Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
>Something like this should do
Great, it works!
Now I am looking for reason to "group" this to be able to press Back
button just once to get to the situation BEFORE using macro. Now it is
on many clicks on Back button.
I it possible?
I used that in Corel programming vba, but here this:
==========
ActiveDocument.BeginCommandGroup "StredPravyDolni"
.
.
.
ActiveDocument.EndCommandGroup
==========
do not work.
Thank you!
Jonathan West - 22 Mar 2005 02:04 GMT
> >Something like this should do
>
[quoted text clipped - 4 lines]
> on many clicks on Back button.
> I it possible?
No, that is not possible.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Helmut Weber - 22 Mar 2005 04:29 GMT
Hi Frantisek,
as far as I see, Jonathan's example does the following:
It creates a new paragraph immediately before the table,
leaves that paragraph empty, and inserts "table caption"
at the beginning of the paragraph predecing the newly
created paragraph!
Redoing it all would in my example mean,
delete all paragraphs immediately preceding tables,
and is not a big problem, if I get you right.
' ------
Sub test8948()
Dim oTable As Table
Dim rtmp As Range
For Each oTable In ActiveDocument.Tables
Set rtmp = oTable.Range.Cells(1).Range
rtmp.Select
Selection.SplitTable
rtmp.InsertBefore "table heading"
Next oTable
' redo
For Each oTable In ActiveDocument.Tables
oTable.Range.Paragraphs(1).Previous.Range.Delete
Next oTable
End Sub
' ----
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/