Microsoft로 로그인
로그인하거나 계정을 만듭니다.
안녕하세요.
다른 계정을 선택합니다.
계정이 여러 개 있음
로그인할 계정을 선택합니다.
영어
죄송합니다. 이 문서는 귀하의 언어로 사용할 수 없습니다.

In Microsoft Word, you can merge a conditional number of records to the same page.

Summary

To merge a conditional number of records to the same page, use a combination of SET, IF, and NEXTIF fields. For example, you can use this method to merge all records with the same name to one page in the merge and create a new page in the merge when a new name is encountered in the data file.

The following example uses a data file with employee names (Employee) and projects they are working on (Projects). The Check field is used in the data file to mark the last record of a particular name.

Sample Data File:

Employee Project Check
Scott Cooper 4578j
Scott Cooper 86785x
Scott Cooper 543p 1
Meng Phua 87x
Meng Phua 89976m 1
Kim Yoshida 7897r
Kim Yoshida 857t
Kim Yoshida 78974x
Kim Yoshida 7868p 1
Set up the main document as follows, with a copy of the conditional statements equal to the maximum number of projects for each employee (four in the above example).

Employee Project
{MERGEFIELD Employee} {MERGEFIELD Project}{set duplicate {if
{MERGEFIELD Check}="1" "off" "on"}}{nextif {mergefield check}=""}{if
{duplicate}="on" "P
t{MERGEFIELD Project}"}{set duplicate {if {MERGEFIELD Check}="1"
"off" "on"}}{nextif {mergefield check}=""}{if {duplicate}="on" "P
t{MERGEFIELD Project}"}{set duplicate {if {MERGEFIELD Check}="1"
"off" "on"}}{nextif {mergefield check}=""}{if {duplicate}="on" "P
t{MERGEFIELD Project}"}{set duplicate {if {MERGEFIELD Check}="1"
"off" "on"}}{nextif {mergefield check}=""}{if {duplicate}="on" "P
t{MERGEFIELD Project}"}
Where "P" represents a paragraph mark that pushes the next project to a new line, and "t" represents a tab character that aligns the next project under the previous project.

The resulting merge document appears as follows:

Employee Project
Scott Cooper 4578j
86785x
543p
--- Page Break ---
Meng Phua 87x
89976m
--- Page Break ---
Kim Yoshida 7897r
857t
78974x
7868p

More Information

도움이 더 필요하세요?

더 많은 옵션을 원하세요?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

이 정보가 유용한가요?

사용 경험에 어떠한 영향을 주었나요?
제출을 누르면 피드백이 Microsoft 제품과 서비스를 개선하는 데 사용됩니다. IT 관리자는 이 데이터를 수집할 수 있습니다. 개인정보처리방침

의견 주셔서 감사합니다!

×