Solved

Dynmic Header - based on text in middle of line

Posted on 2013-05-26
3
297 Views
Last Modified: 2013-05-28
A follow up Q to
https://secure.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Word/Q_28135765.html

It seems that it only picks up the StyleRef of text that is in the beginning of the line.  How would I do this if my ID's are often in the middle of lines?

thx
0
Comment
Question by:endurance
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 250 total points
ID: 39197822
Are you using a paragraph type of style? That is the usual way, but I would expect it to be limited to a whole paragraph.
Try using a character style. That should work wherever the text comes in a pargraph.
0
 
LVL 21

Accepted Solution

by:
EricFletcher earned 250 total points
ID: 39199977
A character style will do what you want. Note that the default setting for the STYLEREF field code is to display the 1st instance found on the page; add the "\l" switch if you want to show the last one on a given page.

As an added benefit of using a character style for this, you can then use Find to select all content that uses the style. Then drop out of the Find dialog, copy, and paste into a new document. This will give you a full list of all content tagged with the given style.
0
 

Author Comment

by:endurance
ID: 39201418
thx
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When creating Microsoft Word-based forms there may be a need to have a form field repeated throughout the whole document. For instance, with a company name, you may want this information repeated automatically throughout the document rather than man…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question