Is it possible to "flatten" a document with refs and conditional t

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a complex template with many refs, docvariables and conditional text
entries that is meant to be further edited by hand (by people who don't
understand refs, docvariables, conditional text entries, etc) after the
automatic version is created. Is it possible to save a straight text copy
from the automatically generated version without all of the coding?
 
cturnock said:
We have a complex template with many refs, docvariables and
conditional text entries that is meant to be further edited by hand
(by people who don't understand refs, docvariables, conditional text
entries, etc) after the automatic version is created. Is it possible
to save a straight text copy from the automatically generated version
without all of the coding?

Yes, make a copy of the document under another name; in the copy, select all
(Ctrl+A) and press Ctrl+Shift+F9 to unlink all fields and turn them into the
plain text of their results.

Since "select all" is really only "select all of the document body", you'll
have to repeat this in each text box, header, footer, footnotes, etc. If
that's a problem for your documents, a macro can run through everything (see
http://www.gmayor.com/installing_macro.htm if needed):

Sub UnlinkAllStories()

Dim myStoryRange As Range

For Each myStoryRange In ActiveDocument.StoryRanges
myStoryRange.Fields.Unlink
Do While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
myStoryRange.Fields.Unlink
Loop
Next myStoryRange

End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Thanks, Jay, for the speedy response. This looks like it is what I need;
I'll give it a shot.
 

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

Back
Top