P
P Ratcliff
I'm going mad with this. I have a very large document with chapters -
each is a section. I have a vba macro which selects the section
containing the cursor, copies the section, opens a new blank document
and pastes the selected area into the new document.
Problem - this was working just fine up until yesterday and now the
paste loses the formatting. I cannot for the life of me figure out
what changed. Going through the code, the selection appears to be just
fine - I can do a manual copy and paste and I get the prompt:
"Recording clipboard style sheet will require copying many styles. Do
you want to use Normal style instead?"
I reply NO and the paste keeps the formatting.
The macro used to prompt me at this spot but now it just continues on
with the paste - and, I guess, uses the Normal template styles so I
don't get my formatting.
Any help is very much appreciated.
Sub getsectionHTML()
Dim curSec
curSec = Selection.Information(wdActiveEndSectionNumber)
ActiveDocument.Sections(curSec).Range.Select
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdFormatOriginalFormatting)
End sub
P Ratcliff
each is a section. I have a vba macro which selects the section
containing the cursor, copies the section, opens a new blank document
and pastes the selected area into the new document.
Problem - this was working just fine up until yesterday and now the
paste loses the formatting. I cannot for the life of me figure out
what changed. Going through the code, the selection appears to be just
fine - I can do a manual copy and paste and I get the prompt:
"Recording clipboard style sheet will require copying many styles. Do
you want to use Normal style instead?"
I reply NO and the paste keeps the formatting.
The macro used to prompt me at this spot but now it just continues on
with the paste - and, I guess, uses the Normal template styles so I
don't get my formatting.
Any help is very much appreciated.
Sub getsectionHTML()
Dim curSec
curSec = Selection.Information(wdActiveEndSectionNumber)
ActiveDocument.Sections(curSec).Range.Select
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdFormatOriginalFormatting)
End sub
P Ratcliff