Solved

Dynmic Header - based on text in middle of line

Posted on 2013-05-26
3
287 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

825 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