Using insertfile for documents with customized outline numbering

H

Hanashi_Aru

Hi. Need help.

I have a template with macro VBA code in it that does the following --

Selection.InsertFile FileName:="\\server\share\folder\EXAMPLE.DOC", _
Range:="", ConfirmConversions:=False, Link:=False, Attachment:=False

Selection.InsertBreak Type:=wdPageBreak

For a list of documents in an array.

Problem: I am having problems with certain documents showing their custom
"Outline Numbering" after the insertfile is finished.
 
J

Jean-Guy Marcil

Hanashi_Aru was telling us:
Hanashi_Aru nous racontait que :
Hi. Need help.

I have a template with macro VBA code in it that does the following --

Selection.InsertFile FileName:="\\server\share\folder\EXAMPLE.DOC", _
Range:="", ConfirmConversions:=False, Link:=False,
Attachment:=False

Selection.InsertBreak Type:=wdPageBreak

For a list of documents in an array.

Problem: I am having problems with certain documents showing their
custom "Outline Numbering" after the insertfile is finished.

And I have a problem understanding your problem!
Can you be a bit more explicit and describe the result and the expected
behaviour?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
H

Hanashi_Aru

Thank you for your reply Jean-Guy.

What I want to have happen is something like this:
If the document has the following outline numbering used, I want it to
appear in the file where insertfile was used (There should be an indentation
at level 2.)

1. This is level 1.
a. This is level 2, first line.
b. This is level 2, second line.

The result of the problem is something like:
This is level 1.
This is level 2, first line.
This is level 2, second line.
 
J

Jean-Guy Marcil

Hanashi_Aru was telling us:
Hanashi_Aru nous racontait que :
Thank you for your reply Jean-Guy.

What I want to have happen is something like this:
If the document has the following outline numbering used, I want it to
appear in the file where insertfile was used (There should be an
indentation at level 2.)

1. This is level 1.
a. This is level 2, first line.
b. This is level 2, second line.

The result of the problem is something like:
This is level 1.
This is level 2, first line.
This is level 2, second line.

Numbered lists are a real can of worms, especially when moving them between
documents.
Using just the code you provided I could not reproduce your problem on Word
2003. What is your Word version?

Sometimes this can be fixed by doing a paragraph reset on the inserted text
(CTRL-Q after having selected the problem text, or, in VBA:
Selection.Paragraphs.Reset). But mostly, it really depends on how the
outline list was created and if styles are involved or not.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
H

Hanashi_Aru

Thanks. Ctrl-Q works a little, but I still have to go in and adjust the
levels.= by indenting.

I am using Word 2002. But the problem was discovered with Word 2000.

The custom outline numbering was based on one of the standard ones from the
outline numbering template list. I called this custom outline numbering
BSList.
 
J

Jean-Guy Marcil

Hanashi_Aru was telling us:
Hanashi_Aru nous racontait que :
Thanks. Ctrl-Q works a little, but I still have to go in and adjust
the levels.= by indenting.

I am using Word 2002. But the problem was discovered with Word 2000.

The custom outline numbering was based on one of the standard ones
from the outline numbering template list. I called this custom
outline numbering BSList.

If even the indent get out of whack, then I suspect there is something wrong
in the way your outline numbering is set up. That you lose the numbers is
"normal"(I mean it has been seen and is expected behaviour) with Word when
paragraphs are moved from one document to another.

Make sure you set up your styles as outlined in this article.
http://www.shaunakelly.com/word/numbering/OutlineNumbering.html

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
H

Hanashi_Aru

Thanks so much for replies. We'll leave it at that for this subject.

From my personal experience, there seems to be a few too many things that
have to be considered when using insertfile.

With that, I changed the code to use documents.open, as a starting point.
Have more documents opening, but at least the outline numbering and everthing
else is preserved.
 

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

Top