[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Dynmic Header - based on text in middle of line

Posted on 2013-05-26
3
Medium Priority
?
311 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 1000 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:
Eric Fletcher earned 1000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
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 …
Suggested Courses

656 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