> OK, I thought it was the macro security warning to which you were referring,
> but on re-reading you post see what it is.
>
> See the article "How can I prevent Word from running macros automatically
> when I create a new instance of Word, open a Word document or create a new
> one?" at:
>
>
http://www.word.mvps.org/FAQs/InterDev/DisableAutoMacros.htm>
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "NYSA-HD" <NYSAHD[ at ]discussions.microsoft.com> wrote in message
> news:1B5AC737-46F0-4760-8DC4-51CC601674DB[ at ]microsoft.com...
> > This solution doesn't work b/c they are all trusted macros. Any other
> > ideas
> > to change the macro to insert files as linked objects?
> >
> >
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> Set the macro security level to High (Tools>Macro>Security), temporarily
> >> if
> >> necessary, then the macros in the documents will be ignored.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
> >>
> >> Doug Robbins - Word MVP
> >>
> >> "NYSA-HD" <NYSAHD[ at ]discussions.microsoft.com> wrote in message
> >> news:4E7D679C-8120-4E0F-9F2F-F1A9B37FA1B3[ at ]microsoft.com...
> >> > This is exactly what I wanted, but I have one issue. The doc files I
> >> > am
> >> > inserting have inherited macros. How can the code below insert the
> >> > files
> >> > w/o
> >> > the macros or better yet as Links to the original documents? When I
> >> > run
> >> > the
> >> > code as is all my dialogue boxes from the macros pop up, and I will no
> >> > longer
> >> > need them at this point.
> >> >
> >> > I really appreciate the help with this.
> >> >
> >> >
> >> >
> >> > "Doug Robbins - Word MVP" wrote:
> >> >
> >> >> If you put all of the documents in a folder by themselves, a macro
> >> >> containing the following code should insert each of them into a new
> >> >> document
> >> >> in the date order:
> >> >>
> >> >> Dim MyPath As String
> >> >>
> >> >> Dim MyName As String
> >> >>
> >> >> Dim Source As Document, Target As Document
> >> >>
> >> >> Dim SourceFile As Range
> >> >>
> >> >> Dim i As Long
> >> >>
> >> >> Dim FileList As Document
> >> >>
> >> >> Set FileList = Documents.Add
> >> >>
> >> >> 'let user select a path
> >> >>
> >> >> With Dialogs(wdDialogCopyFile)
> >> >>
> >> >> If .Display() <> -1 Then Exit Sub
> >> >>
> >> >> MyPath = .Directory
> >> >>
> >> >> End With
> >> >>
> >> >> 'strip quotation marks from path
> >> >>
> >> >> If Len(MyPath) = 0 Then Exit Sub
> >> >>
> >> >> If Asc(MyPath) = 34 Then
> >> >>
> >> >> MyPath = Mid$(MyPath, 2, Len(MyPath) - 2)
> >> >>
> >> >> End If
> >> >>
> >> >> 'get files from the selected path
> >> >>
> >> >> 'and insert them into the doc
> >> >>
> >> >> MyName = Dir$(MyPath & "*.*")
> >> >>
> >> >> Do While MyName <> ""
> >> >>
> >> >> Selection.InsertAfter MyName & vbCr
> >> >>
> >> >> MyName = Dir
> >> >>
> >> >> Loop
> >> >>
> >> >> 'Sort the list of files
> >> >>
> >> >> FileList.Range.Sort SortFieldType:=wdSortFieldAlphanumeric,
> >> >> FieldNumber:="Paragraphs"
> >> >>
> >> >> 'Delete the empty paragraph that will be at the top of the list of
> >> >> files
> >> >>
> >> >> FileList.Paragraphs(1).Range.Delete
> >> >>
> >> >> 'Start a new document into which each of the others will be inserted
> >> >>
> >> >> Set Target = Documents.Add
> >> >>
> >> >> 'Iterate through the list of files, getting the name of each file,
> >> >> opening
> >> >> it
> >> >>
> >> >> 'and inserting its contents into the Target document
> >> >>
> >> >> For i = 1 To FileList.Paragraphs.Count
> >> >>
> >> >> Set SourceFile = FileList.Paragraphs(i).Range
> >> >>
> >> >> SourceFile.End = SourceFile.End - 1
> >> >>
> >> >> Set Source = Documents.Open(MyPath & SourceFile.Text)
> >> >>
> >> >> Target.Range.InsertAfter Source.Range.FormattedText
> >> >>
> >> >> Source.Close wdDoNotSaveChanges
> >> >>
> >> >> Next i
> >> >>
> >> >>
> >> >>
> >> >> Also see the article "Print all documents in a given folder to a
> >> >> single
> >> >> print file" at:
> >> >>
> >> >>
http://www.word.mvps.org/FAQs/MacrosVBA/PrintAllDocsInFldr.htm> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Hope this helps.
> >> >>
> >> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> >> services on a paid consulting basis.
> >> >>
> >> >> Doug Robbins - Word MVP
> >> >>
> >> >> "NYSA-HD" <NYSAHD[ at ]discussions.microsoft.com> wrote in message
> >> >> news:4EB857B5-B768-4A05-9472-107C8999795C[ at ]microsoft.com...
> >> >> > I'm sorry, you were right the outputted files are .doc files named
> >> >> > for
> >> >> > the
> >> >> > date YYYYMMDD.doc
> >> >> >
> >> >> > What is the easiest way to combine them all in date order w/o
> >> >> > manually
> >> >> > inserting each file?
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Jezebel" wrote:
> >> >> >
> >> >> >> 1. Your inputters should be using the the .dot files as templates,
> >> >> >> so
> >> >> >> the
> >> >> >> files you get back should be .doc files. If not, you haven't
> >> >> >> explained
> >> >> >> to
> >> >> >> them well enough how to install the and use the templates.
> >> >> >>
> >> >> >> 2. From your description, simply combining all the docs into one
> >> >> >> big
> >> >> >> one
> >> >> >> should be fine, particularly as it's just a yearly one-off and
> >> >> >> presumably
> >> >> >> you don't need to do anything with the finished document except
> >> >> >> print
> >> >> >> it.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> "NYSA-HD" <NYSAHD[ at ]discussions.microsoft.com> wrote in message
> >> >> >> news:0805C936-E19D-4E1E-AF48-0B12ABF85719[ at ]microsoft.com...
> >> >> >> > Basically we have a group of inputters who record data that gets
> >> >> >> > written
> >> >> >> > in a
> >> >> >> > journal for each date a meeting takes place. We have automated
> >> >> >> > their
> >> >> >> > job
> >> >> >> > by
> >> >> >> > creating .dot files for each form type for the journal entry and
> >> >> >> > have
> >> >> >> > text
> >> >> >> > files inserted by macros that feed the majority of the templates.
> >> >> >> > When
> >> >> >> > they
> >> >> >> > open Word we have a form where they enter the date and it grabs
> >> >> >> > the
> >> >> >> > text
> >> >> >> > and
> >> >> >> > completes the form and asks them any variable questions. It auto
> >> >> >> > saves
> >> >> >> > the
> >> >> >> > file by date in a network folder. At the end of each year we
> >> >> >> > need
> >> >> >> > to
> >> >> >> > combine
> >> >> >> > all of these individual files into one document w/ page numbers
> >> >> >> > and
> >> >> >> > common
> >> >> >> > headers and footers - also a TOC and Index with a title page. We
> >> >> >> > don't
> >> >> >> > see
> >> >> >> > an easy way to page number w/o combining somehow. The document
> >> >> >> > does
> >> >> >> > not
> >> >> >> > have
> >> >> >> > graphics...mostly straight text w/ index markers and styles.
> >> >> >> > There
> >> >> >> > are
> >> >> >> > macros which run our application, but they don't need to be there
> >> >> >> > when
> >> >> >> > it
> >> >> >> > is
> >> >> >> > combined.
> >> >> >> >
> >> >> >> > What do you think is the best way to handle this?
> >> >> >> > Have I provided enough background info.
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > "Jezebel" wrote:
> >> >> >> >
> >> >> >> >> 1. It would help if you explained why you need to combine the
> >> >> >> >> files
> >> >> >> >> in
> >> >> >> >> the
> >> >> >> >> first place. What will you do with the compound document that
> >> >> >> >> you
> >> >> >> >> can't
> >> >> >> >> do
> >> >> >> >> with the individual files?
> >> >> >> >>
> >> >> >> >> 2. 2000 pages isn't so massive anyway, unless the files contain
> >> >> >> >> a
> >> >> >> >> lot
> >> >> >> >> of
> >> >> >> >> graphics or complex tables. You could just build an ordinary
> >> >> >> >> document.
> >> >> >> >>
> >> >> >> >> 3. Why are you working with .dot files?
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "NYSA-HD" <NYSAHD[ at ]discussions.microsoft.com> wrote in message
> >> >> >> >> news:4E56B824-23AF-4250-94F9-2EE5354FABF1[ at ]microsoft.com...
> >> >> >> >> >I am creating a 2000 page book from several smaller files. I
> >> >> >> >> >have
> >> >> >> >> >a
> >> >> >> >> > directory where there is a file named for each date the file
> >> >> >> >> > was
> >> >> >> >> > created.
> >> >> >> >> > For example, 20060102, 20060105, etc.... Where the filenames
> >> >> >> >> > are
> >> >> >> >> > YYYYMMDD.
> >> >> >> >> > There may not be a file for every date, but all files are
> >> >> >> >> > named
> >> >> >> >> > by
> >> >> >> >> > date.
> >> >> >> >> > I
> >> >> >> >> > would like to avoid master documents because of corruption
> >> >> >> >> > issues.
> >> >> >> >> > My
> >> >> >> >> > thought was to create a document with my headers and page
> >> >> >> >> > numbers
> >> >> >> >> > for
> >> >> >> >> > each
> >> >> >> >> > months worth of files. In each month document I need a macro