That's perfect! Exactly what I needed it to do. Thanks you all so much for your help!
Here's my final macro:
Sub RemoveFirstSection()
Dim R As Range
Dim HF As HeaderFooter
' Unlink all headers and footers in section 2 from previous section
For Each HF In ActiveDocument.Sections(2).Headers...
I mentioned previously that the only code I have so far is yours:
Dim r As Range
Set r = ActiveDocument.Range( _
Start:=ActiveDocument.Sections(1).Range _
.Paragraphs(2).Range.Start, _
End:=ActiveDocument.Sections(2).Range _
.Paragraphs(2).Range.Start)
r.Delete
I...
Ok, I'm in Normal View and I've toggle Ctrl+*. What do I look at now? How do I tell if the section break is part of the paragraph?
Any help is greatly appreciated!
Cheryl
Really? Are your footers in the original section 2 linked to previous footers? When mine are linked, I lose the footers entirely.
Any help is greatly appreciated!
Cheryl
Well.... your code is all I've got so far. It does remove the extra paragraph marks in the "empty" section 1, but I do lose my footers.
The headers are ok because I don't link to previous in the headers. But, I do need to link to previous in the footers. So is there anything I can add to your...
That works!
The only thing that is wrong is that I lose my headers and footers when that first section break is deleted. Is there a way to copy the headers/footers from section 2 to section 1 before I run your code?
Any help is greatly appreciated!
Cheryl
I'm trying to use a macro to clean up a document that will start out with a varying number of paragraph marks followed by a section break and two more paragraph marks before the text starts.
Is there a way to select starting with the 2nd paragraph mark in the document and including the first...
I need to right justify the text in the 2nd thru last columns all but 2 tables in a document. How would I do that with a macro? There are 9 tables, but I want to skip tables 7 and 8.
Any help is greatly appreciated!
Cheryl
That helped! I compared your code to mine and found that I had added a line as shown in bold below:
with Selection.Find
.ClearFormatting
.Text = starter
.Font.Bold = False
.MatchWildcards = False
.MatchCase = False
.Execute
End With
and
with Selection.Find...
I copied the same text three times. Can you attach your test document? I don't think I can attach as I don't belong to box.net.
Any help is greatly appreciated!
Cheryl
I put text for three tables in the document (same text three times), but the macro only converts the first one to a table even tho I've added the loop.
Any help is greatly appreciated!
Cheryl
One more question for you...
How do I make it loop through the rest of the document and convert all similar tables?
Any help is greatly appreciated!
Cheryl
I have a generated document that needs to have the text converted to tables. Is there a way to put a bookmark at the start and end of each "table" (or search for specific keywords) to select all the paragraphs to be converted to a single table? The number of rows needed may vary, but many of...
That's what I thought, but when I did that (remove section break and rest of doc in section 3), the headers/footers on the previous section (section 2) were changed to the section 3 headers/footers.
I don't know how to resolve it!
Any help is greatly appreciated!
Cheryl
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.