Can I import Word RTF files & retain styles - existing proj

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Can I import Word RTF files & retain styles - existing proj

Unread post by Dave Gehman »

I'm missing something in the H+M help files... and no search scheme I can think of gets me the answer.

(Question 1, below) I'd like to import Word files (saved as RTF) in a way (Q2) that H+M simply imposes H+M styles on the RTF data. It look as though I can import RTF with styles intact from the Project menu, but that seems to be for creating new projects -- and if I understand correctly, every level of head/subhead in the RTF file creates a new topic. We have multiple sub-heads embedded in topics because our software is just about as complex as any software can be*...and don't want a new topic when an embedded subhead serves perfectly.

Q1. In Write, how can I import the Word RTF file, which represented a single topic, into an existing H+M topic? I don't see an "import" option in the Write ribbon. (The fact that the importation overwrites the existing H+M topic is fine -- we're receiving the Word files after other company personnel have edited them, so we want the imported RTF to take the place of the existing H+M topic.)

Q2. Preparatory steps: Do the Word style properties (font, size, etc.) have to match the the H+M style properties -- or just have the same Style name? For example, in my dreams, I'd like to have text designated as Normal in Word, which might be Times 12 pt, automatically transform into our H+M Normal, Segoe UI 11 pt.

___________
* This is because it is being created by ordinary geniuses. Ordinary geniuses can think up wonderful things and code them, but the grey cells run out when it comes to elegant simplicity. Were this being done by top-tier geniuses, it would not be nearly so complex...
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Can I import Word RTF files & retain styles - existing p

Unread post by Tim Green »

Hi Dave,

In addition to importing to a new project you can also use the Import option in the File menu to import to the project that is currently open. If you import RTF and it contains styles that aren't already in the project you are importing to, those styles will be imported and added to the project stylesheet.

Styles that already exist in the project will be imported if you activate the option for mapping styles to existing styles in the Import screen. Only the name needs to match. Help+Manual will then get the style attributes made available by Word.

Importing and adding to an existing topic isn't possible directly. You need to import to a new topic using File > Import File in the Project tab, and then copy and paste. Also, when importing to a topic instead of a project the styles aren't imported and all the formatting is created as inline in the XML. This is generally a bad solution with RTF, because it can create a huge amount of extraneous XML with some Word documents.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Re: Can I import Word RTF files & retain styles - existing p

Unread post by Dave Gehman »

Tim Green wrote:In addition to importing to a new project you can also use the Import option in the File menu to import to the project that is currently open. If you import RTF and it contains styles that aren't already in the project you are importing to, those styles will be imported and added to the project stylesheet.
Thanks, Just tried this and indeed, the new file is appended to my open H+M project, and most of the styles are adopted. Overall, the text is beautifully preserved with tables and formatting carried over well.

I'm adding to the H+M wishlist:
-- add option to treat all Heading styles below Heading 1 as subheads rather than new topics
-- add Style mapping option

Again, many thanks.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Can I import Word RTF files & retain styles - existing p

Unread post by Tim Green »

Hi Dave,

The option of setting the number of levels to be turned into topics in Word import is an excellent idea. We're definitely going to look into it. :D

I just saw your detailed Wish List entry -- great, thank you very much!
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Simon_Dismore
Posts: 205
Joined: Thu Jul 13, 2017 2:57 pm

Re: Can I import Word RTF files & retain styles - existing p

Unread post by Simon_Dismore »

Until the time if/when H&M has more options for converting RTF, here are approaches that might help.

Create styles in the source Word document that exactly match the style names (and ideally appearance) used in H&M, e.g. Heading2, Heading3, Code Example. It's very important that these are created as entirely new styles based (no style) not any existing style. This means their outline level in Word will be Body text, so they don't create new topics when imported.

Use Word's search-and-replace on your source files to change the existing Heading <space> 2 style to the new Heading2 style, likewise for Heading 3 etc. Note: the appearance on screen will not necessarily change. You can also use search-and-replace to replace all occurances of Courier New with your Code Example style. All these steps can be recorded as a Word (VBA) macro and run every time you receive topics from subject-matter experts.

The resulting document can be saved as RTF and imported in the usual way. The subheadings will not create new topics, and no new styles will be created. To the extent your Word/RTF styles match your H+M styles, text will come across without inline formatting (e.g. Code Example, not Code Example+). Otherwise you'll have to re-apply styles so they are reset.
Dave Gehman
Posts: 575
Joined: Sat Sep 23, 2017 9:05 pm

Re: Can I import Word RTF files & retain styles - existing p

Unread post by Dave Gehman »

Thanks, Simon. I'll look into this more closely.

And TIm, thanks for the thanks - I owe you a great deal for a lot of hand-holding.
Post Reply