View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How can I auto archive a dynamic document?

The following macro will paste your text at the cursor and unlink any fields
in the new document.

Sub PasteAndUnlink()
On Error GoTo oops
Selection.PasteSpecial DataType:=wdPasteText, Placement:= _
wdInLine
With Selection
.WholeStory
.Fields.Unlink
End With
End
oops:
Beep
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Chris wrote:
Doh!

Found help on 'Change a field result to regular text' which looks like
it will do the job.

When all else fails RTFM!

Chris wrote:
I have to compile a weekly report on behalf of the team. I have
developed a standard template with predefined Sections, each of which
I've Bookmarked. Every week each team member opens the standard
template and Saves As to a predetermined document, e.g. TeamMember1,
TeamMember2 etc.

I am then able, by means of INCLUDETEXT fields and the Bookmarks, to
automatically pull all of the Team Member reports into a composite
Team Report, grouping all the Section1s, Section2s etc. However I
also need to make an archive copy of the composite Team Report each
week.

Currently I Copy the composite Team Report and Paste it as
Unformatted Text into a new document which is then saved with an
appropriate name, e.g Archive1, Archive2 etc. I have concluded that
I have to Paste it as Unformatted Text to break the links
established by the INCLUDETEXT and Bookmarks, otherwise all of the
archives would update each time one of the individual contributions
was updated, i.e. each week and the archives would be lost. I then
have to reformat the unformatted text in the Archive as necessary.

I'd like to be able to semi-automate the production of the Archives,
retaining the formatting, and breaking the INCLUDETEXT and Bookmark
links to prevent the Archive from automatically updating the
following week, but how?

I can only think of using a batch file, which I've no experience of,
and would probably struggle with.

Is there another, easier way of doing this?