To those who have asked for the “shared events” VBA procedure, I can’t send it as an attachment because of the Legacy mailing list guidelines (virus concerns). The Excel procedure is given below. Maybe cutting and pasting will work for you.
Some comments: 1. The procedure assumes you have already imported a “For Legacy” GED text file into Col. A – Row 1 of the macro-enabled worksheet (.xlsm), containing the VBA procedure (macro). 2. GED Import Sequence: Data – From Text – Delimited File Type – Tab Delimiter – Text Data Format – Existing Worksheet: $A:$1. 3. After running the procedure, the first row of all inserted records for an event will be highlighted for checking that all went well. 4. The modified GEDCOM can then be copied (all the cells in Col. A) to a text editor and save as a .GED file. 5. I can send you my Excel file that automates all of the above, but that would have to be done directly, outside of the Legacy mailing list. 6. Note: The procedure does not append the Notes (specific to the person’s role) to the event Notes. That could be done, but I think the extra code & actions will slow down the procedure. As it is right now, it takes about 23 minutes to modify my family GEDCOM that has about 3500 individuals and 5000 master events. Sub Find_Shared_Events() ' ' Find "2 _SHAR" shared events and copy records to each individual; ' for exporting GEDCOM to TNG and Ancestry (no support for shared events) ' ' Don Quigley; 1/30/2015 ' Dim firstSHAR As Range Dim firstSHARAdd As String Dim i As Integer Dim actCellAdd As String Dim strname As String Dim shareName As String Dim firstRow As String Dim lastRow As String Dim recordRange As Range Dim indivRow As String Dim indivRange As String Dim rinRange As Range Dim likeShare As String 'Start at top of file Range("A1").Select i = 1 Do Until i = 4 ' Identify first "2 _SHAR" cell for checking later and stopping subroutine If i = 1 Then Cells.Find(What:="2 _SHAR @", After:=ActiveCell, LookIn:=xlValues).Select Set firstSHAR = ActiveCell ActiveCell.Offset(-1, 0).Select i = 2 End If ' Find all "2 _SHAR" cells, one at a time Cells.Find(What:="2 _SHAR @", After:=ActiveCell, LookIn:=xlValues).Select ' If FIND has looped back to first "2 _SHAR" cell, stop subroutine (finished) If i <> 2 Then firstSHARAdd = firstSHAR.Address(False, False) actCellAdd = ActiveCell.Address(False, False) If actCellAdd = firstSHARAdd Then i = 4 End If End If If i = 4 Then Exit Do i = 3 strname = ActiveCell.Value 'Get shared RIN from cell string & place in Col B shareName = Mid(strname, 9) 'Check cells above to find "1 ????" (the "event" that is shared) Do Until ActiveCell.Value Like "1 *" ActiveCell.Offset(-1, 0).Select Loop 'Get row number of first record & place in Col. B firstRow = ActiveCell.Row 'Check cells below to last record for event 'Finding the first of one or more "2 _SHAR" Cells.Find(What:="2 _SHAR @", After:=ActiveCell, LookIn:=xlValues).Select ActiveCell.Offset(-1, 0).Select 'Get row number of last record & place in Col. B lastRow = ActiveCell.Row 'Name range of record values for event Set recordRange = Range("A" & firstRow & ":" & "A" & lastRow) 'Find shared RINs for event & copy records to their individuals Do Until ActiveCell.Value Like "1*" ActiveCell.Offset(1, 0).Select If ActiveCell.Value Like "2 _SHAR @*" Then strname = ActiveCell.Value 'Get shared RIN from cell string & place in Col B shareName = Mid(strname, 9) Set rinRange = ActiveCell 'Call subroutine to find individual with shared event GoSub findIndiv 'Return to RIN cell rinRange.Select End If Loop ' Step down 1 row from present location. ActiveCell.Offset(1, 0).Select Loop 'Return to top of file Range("A1").Select Exit Sub ' ' Subroutine to find individual and insert event records ' findIndiv: 'Find individual and "1 _UID" row below last of existing event records likeShare = "0 " & shareName & " INDI" Cells.Find(What:=likeShare, After:=ActiveCell, LookIn:=xlValues).Select Cells.Find(What:="1 _UID", After:=ActiveCell, LookIn:=xlValues).Select 'Insert event records above "1 _UID row" indivRange = ActiveCell.Address(False, False) recordRange.Select Selection.Copy Range(indivRange).Select Selection.Insert Shift:=xlDown 'Highlite top cell of inserted range for checking ActiveCell.Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 65535 .TintAndShade = 0 .PatternTintAndShade = 0 End With Return End Sub Don Quigley Escondido, CA From: Dave Keeney [mailto:dave.kee...@gmail.com] Sent: Friday, January 30, 2015 11:46 PM To: legacyusergroup@LegacyUsers.com Subject: Re: Re[2]: [LegacyUG] Modify GED File to Remove Shared Events? Are you sharing the VBA procedures? I, too, experience this problem when uploading to Ancestry.com. I've converted all of my census events (among others) to Shared Events and would be interested in your workarounds if possible. Thanks, Dave On Fri, Jan 30, 2015 at 9:49 PM, Don Quigley <dwquig...@cox.net> wrote: Jerry, FYI – I solved the problem by writing some Excel VBA procedures to modify the GEDCOM file from Legacy to assign shared events directly to each person. Works in TNG and Ancestry. Don Quigley Escondido, CA From: Jerry in Michigan [mailto:bearjerca...@gmail.com] Sent: Tuesday, January 13, 2015 9:06 AM To: legacyusergroup@LegacyUsers.com Subject: Re[2]: [LegacyUG] Modify GED File to Remove Shared Events? Don, I'm sorry I don't have an answer for your dilemma, but TNG also maintains an email list for its users and it has quite a few programmer types involved there as well as the owner/creator of the software. If there is a way to do what you need, they might be able to help. A large number of them use Legacy and TNG. Here's the link to join the email group: http://lythgoes.net/mailman/listinfo/tngusers2_lythgoes.net Jerry Boor, MerriamFamilyTree.org ------ Original Message ------ From: "Don Quigley" <dwquig...@cox.net> To: legacyusergroup@legacyusers.com Sent: 1/13/2015 12:28:18 AM Subject: RE: [LegacyUG] Modify GED File to Remove Shared Events? Jay, That works for the “delete” lines, but doesn’t help with the “add” lines that are needed for the “secondary” individuals to get their “own” event. I don’t want to give up the Share feature of Legacy because it’s a big time saver. But I do want accurate trees in Ancestry to help with my research, and in TNG (though I’m just starting there) to get my tree on to the Web. I ‘m going to play around with importing the text GED file into Excel and writing some VB macros to do what is needed. Was hoping to avoid that effort. Don From: Jay Wilpolt [mailto:jaywilp...@aol.com] Sent: Monday, January 12, 2015 7:30 PM To: legacyusergroup@LegacyUsers.com Subject: Re: [LegacyUG] Modify GED File to Remove Shared Events? Don. Try Using Notepad++ for editing your gedcom Search for 2 _Shar and select the "find all lines with this" then repeat the process for the 3 _Role Then at least you can see all the lines and I think you can even delete them all at once. Otherwise I would just go back to Legacy 7.5 and use that to keep in sync. On Mon, Jan 12, 2015 at 4:01 PM, Don Quigley <dwquig...@cox.net> wrote: Has anyone developed a simple way to modify GEDCOM files so they can be uploaded to sites like Ancestry and TNG that don’t support Legacy’s shared events and now lose the events for all individuals except the one for whom the event was originally created? The partial GED file below shows that the changes are not complicated and could be made manually in a text editor – except for the fact that family files may have 100s or 1000s of shared events/individuals. Way too many to do by hand. `````````````````````````````````````````````````````````````` 0 @I1@ INDI 1 NAME Peter /Piper/ 2 GIVN Peter 2 SURN Piper 1 SEX M 1 CENS 2 DATE 1999 2 PLAC San Francisco, San Francisco, California, United States 1 CENS [copied below] 2 DATE 2000 [copied below] 2 PLAC San Francisco, San Francisco, California, United States [copied below] 2 _SHAR @I2@ [deleted] 3 ROLE Household Member [deleted] 1 _UID A519BE2CF0BB421B99E9EB0ACD7F34EF961A 1 CHAN 2 DATE 17 Jul 2014 3 TIME 11:29 1 FAMS @F1@ 0 @I2@ INDI 1 NAME Mary /Contrary/ 2 GIVN Mary 2 SURN Contrary 1 SEX F 1 CENS 2 DATE 1999 2 PLAC San Francisco, San Francisco, California, United States 1 CENS [inserted] 2 DATE 2000 [inserted] 2 PLAC San Francisco, San Francisco, California, United States [inserted] ````````````````````````````````````````````````````````````````````````` Thanks for your ideas. Don Quigley Escondido, CA Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com <http://support.legacyfamilytree.com/> Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com <http://news.legacyfamilytree.com/> ). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com <http://support.legacyfamilytree.com/> Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com <http://news.legacyfamilytree.com/> ). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com <http://support.legacyfamilytree.com/> Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com <http://news.legacyfamilytree.com/> ). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp Legacy User Group guidelines: http://www.LegacyFamilyTree.com/Etiquette.asp Archived messages after Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyusers.com/ Archived messages from old mail server - before Nov. 21 2009: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ Online technical support: http://support.legacyfamilytree.com Follow Legacy on Facebook (http://www.facebook.com/LegacyFamilyTree) and on our blog (http://news.LegacyFamilyTree.com). To unsubscribe: http://www.LegacyFamilyTree.com/LegacyLists.asp