Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
SCrowley SCrowley is offline
external usenet poster
 
Posts: 1
Default Mailmerge to flash cards, odd and even pages

I am merging to Labels (Avery 5164)

I have data in 3 columns of Excel: Prereq #; Question; Answer

I merge the Question and Prereq # into one label, update all labels, works
great! My issue is when I go to merge the Answer into the same Avery labels,
different document, they are flip flopped example: Question is in Column 1,
Row 1 of front page of document, Answer is in Column 2, Row 1 of second page
(other side of paper)

I'm sure there is a field code or formula that will tell mail merge to flip
flop/transpose the info.

If you've done this, I great appreciate your feedback.


--
Thank you,
scrowley(AT)littleonline.com
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mailmerge to flash cards, odd and even pages

The following code was put together for someone who wanted to compile a
document by taking alternate pages from separate files. If you were to
execute two separate mail merges to individual documents, you could use this
code to then combine them into one.

Dim sourcea As Document, sourceb As Document, target As Document, Pages
As Integer, Counter As Integer, targetrange As Range 'targetrange added

Dim evenpage As Range

Set sourcea = Documents.Open(FileName:="...")

sourcea.Repaginate

Pages = ActiveDocument.BuiltInDocumentProperties(wdPropert yPages)

MsgBox Pages

Set sourceb = Documents.Open(FileName:="...")

Set target = Documents.Add

target.PageSetup.LeftMargin = sourcea.PageSetup.LeftMargin

target.PageSetup.RightMargin = sourcea.PageSetup.RightMargin

target.PageSetup.TopMargin = sourcea.PageSetup.TopMargin

target.PageSetup.BottomMargin = sourcea.PageSetup.BottomMargin

target.AcceptAllRevisions

Counter = 0

While Counter Pages

sourcea.Activate

ActiveDocument.Bookmarks("\page").Range.Copy

Set targetrange = target.Range

targetrange.Start = targetrange.End

targetrange.Paste

ActiveDocument.Bookmarks("\page").Range.Cut

sourceb.Activate 'Assumed to be the document containing the even
pages

Selection.EndKey Unit:=wdStory 'Line of code added to start from the
end of the document

ActiveDocument.Bookmarks("\page").Range.Copy

Set targetrange = target.Range

targetrange.Start = targetrange.End

targetrange.Paste

targetrange.Start = targetrange.End

targetrange.InsertBreak Type:=wdPageBreak

Set evenpage = ActiveDocument.Bookmarks("\page").Range

evenpage.Start = evenpage.Start - 1

evenpage.Delete

Counter = Counter + 1

Wend

sourcea.Close wdDoNotSaveChanges

sourceb.Close wdDoNotSaveChanges


--
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

"SCrowley" wrote in message
...
I am merging to Labels (Avery 5164)

I have data in 3 columns of Excel: Prereq #; Question; Answer

I merge the Question and Prereq # into one label, update all labels, works
great! My issue is when I go to merge the Answer into the same Avery
labels,
different document, they are flip flopped example: Question is in Column
1,
Row 1 of front page of document, Answer is in Column 2, Row 1 of second
page
(other side of paper)

I'm sure there is a field code or formula that will tell mail merge to
flip
flop/transpose the info.

If you've done this, I great appreciate your feedback.


--
Thank you,
scrowley(AT)littleonline.com



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:51 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"