Forum Discussion
Kondorosy
Jul 01, 2023Copper Contributor
VBA Word copy full content with Restricted editing
My question is, in vba, how can I copy an opened full word document content to the current word document, with copying EVERYTHING? No matter what I tried, I could not copy the Restrict Editing, only ...
Stefan_Blom
Jul 01, 2023MVP
- KondorosyJul 02, 2023Copper Contributor
Stefan_Blom That's exactly what I did, but it doesn't work well, because although it copies everything, it just doesn't copies the mark of the Restricted Edit sections.
- Stefan_BlomJul 02, 2023MVP
You may have to share the code you are using, for someone to be able to provide a workaround.
- KondorosyJul 03, 2023Copper ContributorOr this is another solution
Dim oDoc As Document
Dim oTarget As Document
Dim oRng As Range
Set oDoc = oWB
Set oTarget = ThisDocument
Set oRng = oTarget.Range
oRng.FormattedText = oDoc.Range.FormattedText
Unfortunately, the last line of this throws an error message:
"4218 This object interface is not supported"