Imported RTF but auto-gen Topic IDs are not human readable

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

Moderators: Alexander Halser, Tim Green

Imported RTF but auto-gen Topic IDs are not human readable

Unread postby Dave Gehman » Wed Jul 17, 2019 7:07 pm

Clearly I must have done something wrong.

Background
New project.
    o Imported a Word RTF file (using styles Normal, Heading 1, Heading 2 and so on)
    o Generated a beautiful new project, just right.

Just right, EXCEPT all but 3 of the Topic IDs consist of concatenations of "TOC" + numbers (for example, "TOC532724345")

This makes the selection of a topic during creation of a link incredibly difficult.

What did I do wrong?
Dave Gehman
 
Posts: 397
Joined: Sat Sep 23, 2017 9:05 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Tim Green » Thu Jul 18, 2019 6:22 am

Hi Dave,

You didn't do anything wrong, this is just Word's internal way of referencing topics with bookmarks. If you import a Word RTF file that has, or has had, a Table of Contents generated in it, you will get these strange Topic IDs in the format Tocxxxxxxx, where the x's are numbers. This is because of bookmarks generated by Word when it creates a TOC. The Tocxxxx bookmarks are inserted at the Heading X headings when you generate a TOC in Word, and then imported by Help+Manual as the Topic IDs. You can see them if you open the Bookmarks dialog in the Insert tab in Word and activate the Hidden Bookmarks option. If they aren't present Help+Manual generates the IDs from the text of the headings with the Heading X styles.

You can delete the hidden bookmarks manually in the dialog to force Help+Manual to base the IDs on the heading texts, but that will take forever in a big project. The easiest way is to use a quick Word macro (DON'T do this on your original Word file if you also have your own bookmarks that you want to keep -- it will delete all of them -- use a copy instead):

1) With only the relevant document open in Word, press Alt+F11 in Word to open the VBA window

2) Select Module in the Insert tab.

3) Paste this code into the Module window:

Code: Select all
Sub removebookmarks()
Dim bkm As Bookmark
For Each bkm In ActiveDocument.Bookmarks
bkm.Delete
Next bkm
End Sub

4) Click the Run button or press F5 to apply VBA directly.

If you then save the Word document as RTF and import it to Help+Manual you will get IDs based on the heading texts instead of the Word bookmarks.
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.
User avatar
Tim Green
Site Admin
 
Posts: 20982
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Dave Gehman » Thu Jul 18, 2019 11:03 am

Very much appreciated.

I may have asked this before...

how do I delete a project? I've searched as deeply as I can in H+M's help file. (I'm wanting to remove the project with the TOC+[numbers] Topic IDs).
Dave Gehman
 
Posts: 397
Joined: Sat Sep 23, 2017 9:05 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Tim Green » Thu Jul 18, 2019 11:10 am

Hi Dave,

A project is just a file or files on your disk, so you would delete them in Windows Explorer. That isn't something you would do from within a program. If it's an .hmxz project you just delete the .hmxz file. If it's a .hmxp project you need to delete the entire folder containing the .hmxp project file, along with all the other files. In the latter case you need to be a little careful, because it's also possible to add your own sub-folders to the project folder for things like graphics, so you need to check whether you want to keep those or any other files you have added there manually.
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.
User avatar
Tim Green
Site Admin
 
Posts: 20982
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Dave Gehman » Thu Jul 18, 2019 11:13 am

And once again, thanks.
Dave Gehman
 
Posts: 397
Joined: Sat Sep 23, 2017 9:05 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Dave Gehman » Thu Jul 18, 2019 11:41 am

Tim Green wrote:1) With only the relevant document open in Word, press Alt+F11 in Word to open the VBA window
...


For whatever reason, the macro didn't work. I'm using Word 2010.

However, now being armed with the knowledge that the unreadable Topic IDs emanated from bookmarks in Word, I simply went to Word's Insert > Bookmark, checked "Hidden" so I could see the TOC bookmarks, and manually deleted them all.

Saved as RTF, imported, result is a brand spanking new project with human-readable Topic IDs.

Thanks again.
Dave Gehman
 
Posts: 397
Joined: Sat Sep 23, 2017 9:05 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Tim Green » Thu Jul 18, 2019 12:51 pm

Hi Dave,

That was a very old script that I haven't used for ages, so it's possible that it needs updating... :? I must admit, the less I have to do with any MS Office programs, the happier I am...
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.
User avatar
Tim Green
Site Admin
 
Posts: 20982
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Dave Gehman » Thu Jul 18, 2019 2:04 pm

Tim Green wrote:I must admit, the less I have to do with any MS Office programs, the happier I am...


Can't understand your attitude. Microsoft clearly uses the Office division to evaluate new programmers out of college. With each new version, it's clear that these new kids are being asked to obfuscate the user interface, move features on menus and ribbons locations arbitrarily, and ensure that whatever you're doing around files will default to useless locations. It's tough work and they should be applauded for their unbelievably effective execution on those goals...
Dave Gehman
 
Posts: 397
Joined: Sat Sep 23, 2017 9:05 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Martin Wynne » Thu Jul 18, 2019 2:12 pm

+1 :)

I don't go near MS Office with a bargepole.

OpenOffice works just fine for me: https://www.openoffice.org/

Martin.
User avatar
Martin Wynne
 
Posts: 2536
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Simon_Dismore » Fri Jul 19, 2019 12:38 am

Dave Gehman wrote:I'm using Word 2010
Tim Green wrote:I must admit, the less I have to do with any MS Office programs, the happier I am...
Martin Wynne wrote:I don't go near MS Office with a bargepole.

If EC-software aims to stay in the multiplatform publishing market is it a good idea to turn your backs on newer versions of Office? When your client has a 365 subscription they'll never be more than six months behind the latest version: if you want to work with them you have to stay on top of the new stuff. You'll be able to collaborate better, and it might reveal valuable opportunities — e.g. compiling xplains as Office add-ins could be a big win for authors.

If you're in the software business nowadays, you have to stay current. You can't un-invent the new stuff, and world-weary contempt isn't going to cut it unless you are totally on top of all the facts, i.e. you're an expert in the new who prefers the old. That's a difficult stance to maintain if you aren't using the latest version regularly.
Simon_Dismore
 
Posts: 132
Joined: Thu Jul 13, 2017 2:57 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Tim Green » Fri Jul 19, 2019 6:40 am

Hi Simon,

I didn't mean I ignore Office -- I have a 365 subscription as well. However, I really don't like it very much. Like so many Microsoft products, it often gives you that uneasy feeling that it's struggling very hard just to stay afloat, and Word in particular often confirms that by going belly up for no apparent reason. I would never do any of my long-form writing like novels in Word because I simply don't trust it with my work. I use Scrivener for that.
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.
User avatar
Tim Green
Site Admin
 
Posts: 20982
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Simon_Dismore » Fri Jul 19, 2019 8:31 am

Tim Green wrote:struggling very hard just to stay afloat

:shock:
Simon_Dismore
 
Posts: 132
Joined: Thu Jul 13, 2017 2:57 pm

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby julio » Wed Jul 24, 2019 2:08 pm

Simon_Dismore wrote:
Tim Green wrote:struggling very hard just to stay afloat

:shock:


In Portuguese we have a saying that roughly translates as "swimming with pants on" :D
User avatar
julio
 
Posts: 97
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil

Re: Imported RTF but auto-gen Topic IDs are not human readab

Unread postby Tim Green » Wed Jul 24, 2019 3:43 pm

julio wrote:In Portuguese we have a saying that roughly translates as "swimming with pants on" :D

I like it. I came up with something similar myself recently, explaining that trying to get real work done on an iPad was like trying to swim in a snow suit... 8)
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.
User avatar
Tim Green
Site Admin
 
Posts: 20982
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 8 guests

cron