Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-05-2018, 05:56 PM
lemonap618 lemonap618 is offline mining 4k page word document Windows 7 64bit mining 4k page word document Office 2010 64bit
Novice
mining 4k page word document
 
Join Date: Jul 2018
Posts: 3
lemonap618 is on a distinguished road
Default mining 4k page word document

Hi All,
quick question - I have a 4K page word document with hundreds of user stories. there are 3 types of user story categories that are presented in the 4k document.



My task is to separate these user stories into the 3 separate files based on the user story categories. My question - how would I separate these stories systematically? they are separated into headers and sub-headers. IAny and all help is much appreciated
Reply With Quote
  #2  
Old 07-05-2018, 06:48 PM
Guessed's Avatar
Guessed Guessed is offline mining 4k page word document Windows 10 mining 4k page word document Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You haven't given enough information.

How do you know what category a story is? Is that part of the heading? When you change from one category to another, is there a consistent separator?

Without seeing a sample doc, it is unlikely we can suggest an efficient method of sorting this.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 07-06-2018, 01:09 PM
lemonap618 lemonap618 is offline mining 4k page word document Windows 7 64bit mining 4k page word document Office 2010 64bit
Novice
mining 4k page word document
 
Join Date: Jul 2018
Posts: 3
lemonap618 is on a distinguished road
Default

Hi Andrew,
Thank you for your response. I have attached a sample word document that will hopefully provide the information you need. If you look at the the "attributes" sections within each header you will see in the table there is a noted release. The values here are either "profit analyzer", "deal manager", "price manager", or its blank.

My question is - is there a way to separate this document by the release field in the table for each header?

Thanks for your time!
Attached Files
File Type: docx User_Stories_Vendavo_PA_PM_DM_sample.docx (48.3 KB, 15 views)
Reply With Quote
  #4  
Old 07-06-2018, 11:13 PM
macropod's Avatar
macropod macropod is offline mining 4k page word document Windows 7 64bit mining 4k page word document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I doubt anyone would have connected your 'user story categories' with what's in your document. Try:
Code:
Sub ExtractUserStories()
Application.ScreenUpdating = False
Dim DocSrc As Document, DocTgt As Document, Tbl As Table, Rng As Range
Dim ArrRls, i As Long, r As Long, bExp As Boolean
ArrRls = Array("Profit Analyzer", "Deal Manager", "Price Manager")
Set DocSrc = ActiveDocument
For i = 0 To UBound(ArrRls)
  Documents.Add (DocSrc.AttachedTemplate.FullName)
  ActiveDocument.SaveAs2 FileName:=DocSrc.Path & "\" & ArrRls(i) & ".docx", FileFormat:=wdFormatXMLDocument, AddToRecentFiles:=False
Next
With DocSrc.Range
  .ListFormat.ConvertNumbersToText
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = ""
    .Style = wdStyleHeading1
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    Set Rng = .Paragraphs(1).Range
    Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
    For i = 0 To UBound(ArrRls)
      For Each Tbl In Rng.Tables
        bExp = False
        With Tbl
          If InStr(.Range.Text, ArrRls(i)) > 0 Then
            Set DocTgt = Documents(ArrRls(i) & ".docx"): bExp = True
            With DocTgt
              With .Range
                .Characters.Last.FormattedText = Rng.FormattedText
                .InsertAfter Chr(12)
              End With
              .Save
              DoEvents
            End With
            Exit For
          End If
        End With
      Next
    Next
    .Start = Rng.End
    .Find.Execute
  Loop
End With
For i = 0 To UBound(ArrRls)
  Documents(ArrRls(i) & ".docx").Close True
Next
DocSrc.Undo (1)
Set Rng = Nothing: Set DocTgt = Nothing: Set DocSrc = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 07-10-2018, 03:54 PM
lemonap618 lemonap618 is offline mining 4k page word document Windows 7 64bit mining 4k page word document Office 2010 64bit
Novice
mining 4k page word document
 
Join Date: Jul 2018
Posts: 3
lemonap618 is on a distinguished road
Default

Thank you so much for the response - very helpful!
Reply With Quote
Reply

Tags
data mining

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have 20 page word document with a footer. Can i change page # 10 footer only? aligahk06 Word 2 10-25-2017 04:53 AM
Running Head AND Page Number on First Page of Document (for APA Format) with Word 2003 DBinSJ Word 3 11-23-2016 11:52 AM
Adding a link into a word document that when pressed, takes user to a page within the same document yan89 Word 1 04-29-2016 01:54 PM
2 page document printing problem, text from page 1 in layout of page 2 when printed laurawether45 Word 1 08-02-2012 07:03 AM
mining 4k page word document 600 page document in word 2007 ggun123 Word 3 08-23-2011 06:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft