• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Linking Word docs - Style differences

Contributor ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

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

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Apr 10, 2017 Apr 10, 2017

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

Votes

Translate

Translate
Community Expert ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

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

2017_03_20_MappingWordStyles_WordSource.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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


See www.grainge.org for RoboHelp and Authoring information

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2017 Mar 21, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

I wish...

2017-03-24_14-56-57.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2017 Mar 25, 2017

Copy link to clipboard

Copied

The import test file can be found here.


See www.grainge.org for RoboHelp and Authoring information

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp