28 Replies Latest reply on Apr 10, 2017 7:59 AM by prhmusic2

    Linking Word docs - Style differences

    prhmusic2 Level 2

      I've been continuing my war with linking Word docs into my RoboHelp project. This has me baffled.

       

      First, I ran a Word macro that puts the name of the style assigned to the paragraph in brackets. <[AHCISListNumberLevel01]> means Word style AHCISListNumberLevel01 is assigned to the paragraph, and <[AHCISListNumberLevel02]> means Word style AHCISListNumberLevel02 is assigned to the paragraph. What I can't wrap my head around is when I look at my HTML5 output, step 1 shows the <[AHCISListNumberLevel02]> style as left-aligned with the number 1 (which is wrong) but under step 3, <[AHCISListNumberLevel02]> is indented (which is correct). What am I missing?

      2017_03_20_MappingWordStyles.jpg

      Eternal gratitude awaits anyone that can solve this riddle!

       

      Paul Hanson

        • 1. Re: Linking Word docs - Style differences
          Jeff_Coatsworth Adobe Community Professional & MVP

          Before going to HTML5, how does it look in the resulting RH project? Do the styles map properly at that point? If they don't, then outputting to HTML5 isn't going to tell you much.

          • 2. Re: Linking Word docs - Style differences
            prhmusic2 Level 2

            This is a Word doc that is linked to RoboHelp and it looks correct in Word:

            2017_03_20_MappingWordStyles_WordSource.jpg

            • 3. Re: Linking Word docs - Style differences
              Jeff_Coatsworth Adobe Community Professional & MVP

              Ok, now what does it look like in the resulting RH topic?

              • 4. Re: Linking Word docs - Style differences
                prhmusic2 Level 2

                Jeff,

                 

                I'm not sure what you mean by "the resulting RH topic" as I'm linking to the Word doc. There's the Word doc and then there's the output I generate from the project. I wondered if you meant what does the HTML code look like for the linked Word doc so when I looked at that, I can see in the HTML code that RH is adding a <p style=""> tag within the <li> tag, as in:

                <li>

                <p style="">text</p>

                </li>

                |

                I'm experimenting with how to change:

                <li>

                <p style="">text</p>

                </li>

                to

                <li>

                text

                </li>

                and what that does to the HTML5 output.

                • 5. Re: Linking Word docs - Style differences
                  Jeff_Coatsworth Adobe Community Professional & MVP

                  You have a Word doc and it's linked to a RH project that is made up of topics created by the pagination settings you told it to use when it linked with the Word source. There's a Conversion Settings mapping that translates Word Styles into RH topic styles, pagination settings (how to create multiple RH topics out of a single Word doc based on something like Heading1), and how to treat lists. My suspicion is that the mapping between Word/RH is messed up; that's why your multi-level lists aren't behaving. Did you check out Peter Grainge's site (grainge.org) for his topics on linking Word docs & Multi-Level Lists?

                  • 6. Re: Linking Word docs - Style differences
                    Peter Grainge Adobe Community Professional (Moderator)

                    Why put the style in brackets? Not something I have seen done.

                     


                    See www.grainge.org for RoboHelp and Authoring information

                     

                     

                    @petergrainge

                    • 7. Re: Linking Word docs - Style differences
                      prhmusic2 Level 2

                      The brackets aren't in the style name - it's just what the macro does when it puts the name of the style at the beginning of the paragraph.

                      Edited - this is a screenshot of the Word styles. Each begins with A (to put it at the top alphabetically) then HCIS (the name of my department), then a description.

                      2017_03_20_WordStyles.jpg

                      • 8. Re: Linking Word docs - Style differences
                        Peter Grainge Adobe Community Professional (Moderator)

                        In which case I think Jeff has pointed you to the right places on my site. If in Word you are using anything other than the default tab stops, my experience is that problems ensue. Setting up a Word template that worked reliably with tabs in Word only is something I have spent a morning on in the past, never mind when it comes into RoboHelp.

                         


                        See www.grainge.org for RoboHelp and Authoring information

                         

                         

                        @petergrainge

                        • 9. Re: Linking Word docs - Style differences
                          prhmusic2 Level 2

                          I don't think I'm communicating clearly - I'm mapping a Word style. In my original screen capture above, RoboHelp maps the style incorrectly in step 1 (left-aligned) but, using the same style, it displays correctly in step 3. If both steps 1 & 3 were not displaying correctly, I'd understand, but I don't understand why the same Word style yields different results in the output.

                          • 10. Re: Linking Word docs - Style differences
                            Jeff_Coatsworth Adobe Community Professional & MVP

                            Since I've never done any Word to RH import work, I thought I would give it a try in my RH11 copy.

                            Here's the Word file:

                            worddoc.PNG

                            Here's the Conversion settings in RH:

                            conversion_settings.PNG

                            The resulting RH topic - Design View:

                            rhtopic_design_view.PNG

                            RH topic - HTML view:

                            rhtopic_html_view.PNG

                            And the Responsive HTML5:

                            responsive_output.PNG

                            I think everything is coming over correctly - I could then adjust the topic's appearance by messing with the referenced CSS file.

                            • 11. Re: Linking Word docs - Style differences
                              prhmusic2 Level 2

                              Do you get the same results when you link to the Word document instead of importing it? It's when I'm linking to the Word doc when I'm getting the results in this discussion.

                               

                              Paul

                              • 12. Re: Linking Word docs - Style differences
                                Jeff_Coatsworth Adobe Community Professional & MVP

                                Yup looks exactly the same - I set up the blank project, right-clicked and linked to the Word doc, went into the Project Settings to set the Conversion Settings mapping - making sure that I told it to convert the list as a Multi-level list, not HTML; then I did an "Update All" - resulting RH topic looked the same & then I did the Responsive HTML5 generation. All the same.

                                • 13. Re: Linking Word docs - Style differences
                                  prhmusic2 Level 2

                                  Did you define Word styles for each of your different levels in the multi-level list and map those to a corresponding CSS definition? I've defined a Word style for each level - AHCISListNumberLevel01 for level 1, AHCISListNumberLevel02 for level 2, etc.

                                   

                                  I'm still looking for the secret sauce to explain why applying the exact same style in the same Word doc to the second-level (a, b, c) looks one way in step 1 (with no indentation) and a different way in step 3 (with indention)...

                                   

                                  Paul

                                  • 14. Re: Linking Word docs - Style differences
                                    Jeff_Coatsworth Adobe Community Professional & MVP

                                    Nope, I just left everything as [Source] - again, can you show us the RH topic that you get created (both Design & HTML views would be helpful)?

                                    • 15. Re: Linking Word docs - Style differences
                                      prhmusic2 Level 2

                                      As an update to this issue, I have contacted Adobe Tech Support. Created a new project with a single linked Word doc - this is what I see:

                                      2017_03_24_RoboHelp_02.jpg

                                      2017_03_24_RoboHelp_03.jpg

                                      2017_03_24_RoboHelp_01.jpg

                                      • 16. Re: Linking Word docs - Style differences
                                        Peter Grainge Adobe Community Professional (Moderator)

                                        What happens if you don't run the macro?

                                         

                                        Also, create a new document just indenting using Word's default styles and

                                        tabs. See if that is better.

                                        • 17. Re: Linking Word docs - Style differences
                                          prhmusic2 Level 2

                                          Peter,

                                           

                                          I regret ever mentioning the macro - it is a distraction and has nothing to do with anything in this issue - it simply adds the name of the style that is applied to the paragraph at the beginning of the line.

                                          |

                                          Sub ShowStyles()

                                          '

                                          ' showstyles Macro

                                          '

                                          ' Sub ShowStyles()

                                          ' Version 06.05.12

                                          ' Show style names as <A>-type codes in the text

                                           

                                          noShow = ",N,TOC 1,TOC 2,TOC 3,,,,"

                                          noShow = noShow & ",Table of Figures,P1,,,"

                                           

                                          abbrvs = ",MTDisplayEquation,Disp,Heading 1,A,Heading 2,B,,,"

                                          abbrvs = abbrvs & ",Heading 3,C,Heading 4,D,Normal,N,"

                                           

                                          removePads = False

                                           

                                          doTables = True

                                          ' Merged cells generate an error, so ignore it

                                          ' and carry on regardless!

                                          If doTables = True Then On Error Resume Next

                                           

                                          ' Find return <|

                                          Set rng = ActiveDocument.Content

                                          With rng.Find

                                            .ClearFormatting

                                            .Replacement.ClearFormatting

                                            .Text = "<["

                                            .Wrap = wdFindContinue

                                            .Replacement.Text = ""

                                            .Forward = True

                                            .MatchWildcards = False

                                            .Execute

                                          End With

                                           

                                          gotCode = rng.Find.Found

                                          myTrack = ActiveDocument.TrackRevisions

                                          ActiveDocument.TrackRevisions = False

                                          'If the codes are there, remove them

                                          If gotCode Then

                                            Set rng = ActiveDocument.Content

                                            With rng.Find

                                              .Text = "\<\[*\]\>"

                                              .Wrap = wdFindContinue

                                              .Replacement.Text = ""

                                              .Forward = True

                                              .MatchWildcards = True

                                              .Execute Replace:=wdReplaceAll

                                            End With

                                          Else

                                          ' If no codes then add codes

                                            i = ActiveDocument.Paragraphs.Count

                                            abbrvs = abbrvs & ","

                                            For Each myPara In ActiveDocument.Paragraphs

                                              thisStyle = myPara.Style

                                              typeIt = True

                                              If InStr(noShow, "," & thisStyle & ",") > 0 Then typeIt = False

                                              If doTables = False And myPara.Range.Information(wdWithInTable) = True Then typeIt = False

                                              If typeIt = True Then

                                                myPos = InStr(abbrvs, thisStyle)

                                                If myPos > 0 Then

                                                  thisStyle = Mid(abbrvs, myPos + Len(thisStyle) + 1)

                                                  thisStyle = Left(thisStyle, InStr(thisStyle, ",") - 1)

                                                End If

                                                myPara.Range.InsertBefore Text:="<[" & thisStyle & "]>"

                                              End If

                                              i = i - 1

                                              StatusBar = "Paragraphs to go: " & Str(i)

                                            Next myPara

                                          End If

                                           

                                          If removePads = True And gotCode = False Then

                                          ' Check whether the user wants to remove the pads

                                            myResponse = MsgBox("Remove pad characters?", vbQuestion + vbYesNo)

                                            If myResponse = vbYes Then

                                              Set rng = ActiveDocument.Content

                                              With rng.Find

                                                .Text = "<["

                                                .Wrap = wdFindContinue

                                                .Replacement.Text = "<"

                                                .Forward = True

                                                .MatchWildcards = False

                                                .Execute Replace:=wdReplaceAll

                                              End With

                                              With rng.Find

                                                .Text = "]>"

                                                .Wrap = wdFindContinue

                                                .Replacement.Text = ">"

                                                .Forward = True

                                                .MatchWildcards = False

                                                .Execute Replace:=wdReplaceAll

                                              End With

                                            End If

                                          End If

                                          StatusBar = ""

                                          ActiveDocument.TrackRevisions = myTrack

                                          End Sub

                                          |

                                          Paul

                                          • 18. Re: Linking Word docs - Style differences
                                            prhmusic2 Level 2

                                            I just finished linking the Import902Import Tests.doc file from your website to my test project. This is what I see in the Word document:

                                            This is what I see in the HTML5 output:

                                            Paul

                                            • 19. Re: Linking Word docs - Style differences
                                              Jeff_Coatsworth Adobe Community Professional & MVP

                                              Hey Paul, what's the location of that test file on Peter's site - I'm not seeing it - the zip file I found doesn't have any multi-level lists in it.

                                              Also, can you give us an image of the RH topic - you keep on shooting past that stage to get to the HTML5 output - your output is going to depend on how the RH topic looks like & the HTML that's encoded in it, not the final output.

                                              • 20. Re: Linking Word docs - Style differences
                                                Peter Grainge Adobe Community Professional (Moderator)

                                                My point was not what the macro is supposed to do but any side effects.

                                                • 21. Re: Linking Word docs - Style differences
                                                  prhmusic2 Level 2

                                                  Jeff - sorry - I was focused on the concept that I should never have to look or edit the HTML code that RH is generating because it should (simply) convert the Word doc to HTML per my settings. Why it indents the a b c in one step and not in another step, with the same style applied, is the main issue that I'm trying to solve. From what you've posted and from what I've heard from Adobe Tech Support, I seem to be the only RH user with the issue. <grin>

                                                  I downloaded the Word file from this page on Peter's site: Linking Using RoboHelp 9 or 10

                                                  HTML view:

                                                  Design view:

                                                   

                                                  Paul

                                                  • 22. Re: Linking Word docs - Style differences
                                                    Jeff_Coatsworth Adobe Community Professional & MVP

                                                    Ok, I still couldn't find Peter's example, but I just went back and added a bit more levels to the sample I did before to match yours. I think I've figured out where you're going off course. When I first created the blank RH11 project, I went to the Project Settings and selected the "Edit conversion settings for Word documents" button. Then since I didn't care about how the paragraphs looked, I just told it to automap them; the really important part is on the "Other Settings" part of the tree - that's where I told it to "Convert Word list to" "Multilevel List" - if I selected "HTML List" I get the HTML you see in your topic; if I pick Multilevel List, I get the HTML that appears in my topic (back in post#10).

                                                    • 24. Re: Linking Word docs - Style differences
                                                      Jeff_Coatsworth Adobe Community Professional & MVP

                                                      The topic preview is not WYSIWYG - check your CSS that you're applying to the resulting HTML5 topic

                                                      • 25. Re: Linking Word docs - Style differences
                                                        Peter Grainge Adobe Community Professional (Moderator)

                                                        The import test file can be found here.

                                                         


                                                        See www.grainge.org for RoboHelp and Authoring information

                                                         

                                                         

                                                        @petergrainge

                                                        • 26. Re: Linking Word docs - Style differences
                                                          Jeff_Coatsworth Adobe Community Professional & MVP

                                                          @Peter - that's what I thought, but the resulting doc file doesn't seem to represent what the OP was showing as a multi-level list example.

                                                          • 27. Re: Linking Word docs - Style differences
                                                            prhmusic2 Level 2

                                                            I was using the List Number 2, List Number 3, List Number 4, and List Number 5 styles from the Import902Import Tests.doc file.

                                                             

                                                            I am continuing to work with with Adobe Tech Support. The test project they sent to me works fine on their side, but this is what I see:

                                                            The investigation continues ...

                                                            • 28. Re: Linking Word docs - Style differences
                                                              prhmusic2 Level 2

                                                              As a follow-up, if I select a list that has multi-levels in my linked Word documents and apply a pre-defined list in Word, I am able to generate my HTML5 output and see what I expected. Thank you to all who offered suggestions – much appreciated!

                                                               

                                                              Ultimately, I will have ~100 Word docs linked to this project so it was very important to get this to work correctly.

                                                               

                                                              Paul