Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
L.Allan L.Allan is offline
external usenet poster
 
Posts: 3
Default RTF: Right-justify part of paragraph (not entire paragraph)?

I'm trying to right-justify part of a line that I'm generating with a C++
program. I'm familiar with the the \qr and \qc and \ql to justify right,
center, and left respectively.

If I embed a \qr within a paragraph, then the entire paragraph is right
justified. I want to have just the text after the \qr be right justified on
the same line, and the text before the \qr remain left justified on the same
line.

This is the equivalent of what I want to generate (first part is standard,
simple rtf header):

{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\nowidc...
Line 1 with standard left justification (slj)\par
Line 2 with slj and then \qr right justified\par
Line 3 with slj\ql\par
Line 4 with standard left justification (slj)\par
Line 5 with slj and then \line\qr right justified\par
Line 6 with left justification\ql\par
Line 7 with left justification
}

You can copy/paste into WordPad to see how the above is "rendered".

I can use \line\qr tags in the 5th line to cause a line-break and then the
rest of the paragraph is right-justified. I want to be able to do this
without the \line tag and have it remain as one line. I want it to look
something like:

Line 1 with standard left justification (slj)
Line 2 with slj and then.......................right justified
Line 3 with slj\ql
Line 4 with standard left justification (slj)
Line 5 with slj and then
.................................................. ........right justified
Line 6 with left justification
Line 7 with left justification

(above may not have intended alignment because of variable width font.

Thanks


  #2   Report Post  
Posted to microsoft.public.word.newusers
Terry Farrell Terry Farrell is offline
external usenet poster
 
Posts: 2,904
Default Right-justify part of paragraph (not entire paragraph)?

You need to use a right-aligned tab on the paragraphs when you are trying to
'shuffle right'. Or if you really want the dot leaders (rather than it just
being for clarity in this plain text post), you need to use a right aligned
tab leader.

--
Terry Farrell - MSWord MVP

"L.Allan" wrote in message
...
I'm trying to right-justify part of a line that I'm generating with a C++
program. I'm familiar with the the \qr and \qc and \ql to justify right,
center, and left respectively.

If I embed a \qr within a paragraph, then the entire paragraph is right
justified. I want to have just the text after the \qr be right justified
on the same line, and the text before the \qr remain left justified on the
same line.

This is the equivalent of what I want to generate (first part is standard,
simple rtf header):

{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\nowidc...
Line 1 with standard left justification (slj)\par
Line 2 with slj and then \qr right justified\par
Line 3 with slj\ql\par
Line 4 with standard left justification (slj)\par
Line 5 with slj and then \line\qr right justified\par
Line 6 with left justification\ql\par
Line 7 with left justification
}

You can copy/paste into WordPad to see how the above is "rendered".

I can use \line\qr tags in the 5th line to cause a line-break and then the
rest of the paragraph is right-justified. I want to be able to do this
without the \line tag and have it remain as one line. I want it to look
something like:

Line 1 with standard left justification (slj)
Line 2 with slj and then.......................right justified
Line 3 with slj\ql
Line 4 with standard left justification (slj)
Line 5 with slj and then
.................................................. .......right justified
Line 6 with left justification
Line 7 with left justification

(above may not have intended alignment because of variable width font.

Thanks



  #3   Report Post  
Posted to microsoft.public.word.newusers
L.Allan L.Allan is offline
external usenet poster
 
Posts: 3
Default Right-justify part of paragraph (not entire paragraph)?

Thanks for the reply ... I hadn't heard of "right aligned tabs", but looked
at the RTF 1.5 spec and found \tqr.

I'm fuzzy on how to use this. Also, the size of CRichEdit control (using
MFC) is variable because the end-user can drag the size to be narrower. I'm
wondering is this would influence how to specify the \tqr value(s).

In the original question, I had a very simple "header", but there are
actually indentations, "out-dentations", and left aligned tabs specified.
The actual header looks like this:
{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}
\viewkind4\uc1\pard\fi-450\li450\tx450\tx700\tx950\nowidctlpar\fs36

It would be Very Helpful to see the revised rtf (Line 1 thru Line 7) to
accomplish your answer.


"Terry Farrell" wrote in message
...
You need to use a right-aligned tab on the paragraphs when you are trying
to 'shuffle right'. Or if you really want the dot leaders (rather than it
just being for clarity in this plain text post), you need to use a right
aligned tab leader.

--
Terry Farrell - MSWord MVP

"L.Allan" wrote in message
...
I'm trying to right-justify part of a line that I'm generating with a C++
program. I'm familiar with the the \qr and \qc and \ql to justify right,
center, and left respectively.

If I embed a \qr within a paragraph, then the entire paragraph is right
justified. I want to have just the text after the \qr be right justified
on the same line, and the text before the \qr remain left justified on
the same line.

This is the equivalent of what I want to generate (first part is
standard, simple rtf header):

{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\nowidc...
Line 1 with standard left justification (slj)\par
Line 2 with slj and then \qr right justified\par
Line 3 with slj\ql\par
Line 4 with standard left justification (slj)\par
Line 5 with slj and then \line\qr right justified\par
Line 6 with left justification\ql\par
Line 7 with left justification
}

You can copy/paste into WordPad to see how the above is "rendered".

I can use \line\qr tags in the 5th line to cause a line-break and then
the rest of the paragraph is right-justified. I want to be able to do
this without the \line tag and have it remain as one line. I want it to
look something like:

Line 1 with standard left justification (slj)
Line 2 with slj and then.......................right justified
Line 3 with slj\ql
Line 4 with standard left justification (slj)
Line 5 with slj and then
.................................................. .......right justified
Line 6 with left justification
Line 7 with left justification

(above may not have intended alignment because of variable width font.

Thanks





  #4   Report Post  
Posted to microsoft.public.word.newusers
Terry Farrell Terry Farrell is offline
external usenet poster
 
Posts: 2,904
Default Right-justify part of paragraph (not entire paragraph)?

It would be best to post this in one of the VBA groups where the programmers
hang out. It is beyond my expertise!

Terry

"L.Allan" wrote in message
...
Thanks for the reply ... I hadn't heard of "right aligned tabs", but
looked at the RTF 1.5 spec and found \tqr.

I'm fuzzy on how to use this. Also, the size of CRichEdit control (using
MFC) is variable because the end-user can drag the size to be narrower.
I'm wondering is this would influence how to specify the \tqr value(s).

In the original question, I had a very simple "header", but there are
actually indentations, "out-dentations", and left aligned tabs specified.
The actual header looks like this:
{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}
\viewkind4\uc1\pard\fi-450\li450\tx450\tx700\tx950\nowidctlpar\fs36

It would be Very Helpful to see the revised rtf (Line 1 thru Line 7) to
accomplish your answer.


"Terry Farrell" wrote in message
...
You need to use a right-aligned tab on the paragraphs when you are trying
to 'shuffle right'. Or if you really want the dot leaders (rather than it
just being for clarity in this plain text post), you need to use a right
aligned tab leader.

--
Terry Farrell - MSWord MVP

"L.Allan" wrote in message
...
I'm trying to right-justify part of a line that I'm generating with a
C++ program. I'm familiar with the the \qr and \qc and \ql to justify
right, center, and left respectively.

If I embed a \qr within a paragraph, then the entire paragraph is right
justified. I want to have just the text after the \qr be right justified
on the same line, and the text before the \qr remain left justified on
the same line.

This is the equivalent of what I want to generate (first part is
standard, simple rtf header):

{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\nowidc...
Line 1 with standard left justification (slj)\par
Line 2 with slj and then \qr right justified\par
Line 3 with slj\ql\par
Line 4 with standard left justification (slj)\par
Line 5 with slj and then \line\qr right justified\par
Line 6 with left justification\ql\par
Line 7 with left justification
}

You can copy/paste into WordPad to see how the above is "rendered".

I can use \line\qr tags in the 5th line to cause a line-break and then
the rest of the paragraph is right-justified. I want to be able to do
this without the \line tag and have it remain as one line. I want it to
look something like:

Line 1 with standard left justification (slj)
Line 2 with slj and then.......................right justified
Line 3 with slj\ql
Line 4 with standard left justification (slj)
Line 5 with slj and then
.................................................. .......right justified
Line 6 with left justification
Line 7 with left justification

(above may not have intended alignment because of variable width font.

Thanks






  #5   Report Post  
Posted to microsoft.public.word.newusers
L.Allan L.Allan is offline
external usenet poster
 
Posts: 3
Default Right-justify part of paragraph (not entire paragraph)?

Thanks for your assistance ...

Actually, my impression is that it isn't so much a programming question as
"What should the rtf file look like?"

I'm been doing lots of "trial and error" to get a rtf file to look ok with
WordPad, and then figure out how to generate it. I use a text editor (such
as NotePad) to "fuss with" the rtf, then save and open with WordPad, and see
what it looks like.



"Terry Farrell" wrote in message
...
It would be best to post this in one of the VBA groups where the
programmers hang out. It is beyond my expertise!

Terry

"L.Allan" wrote in message
...
Thanks for the reply ... I hadn't heard of "right aligned tabs", but
looked at the RTF 1.5 spec and found \tqr.

I'm fuzzy on how to use this. Also, the size of CRichEdit control (using
MFC) is variable because the end-user can drag the size to be narrower.
I'm wondering is this would influence how to specify the \tqr value(s).

In the original question, I had a very simple "header", but there are
actually indentations, "out-dentations", and left aligned tabs specified.
The actual header looks like this:
{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}
\viewkind4\uc1\pard\fi-450\li450\tx450\tx700\tx950\nowidctlpar\fs36

It would be Very Helpful to see the revised rtf (Line 1 thru Line 7) to
accomplish your answer.


"Terry Farrell" wrote in message
...
You need to use a right-aligned tab on the paragraphs when you are
trying to 'shuffle right'. Or if you really want the dot leaders (rather
than it just being for clarity in this plain text post), you need to use
a right aligned tab leader.

--
Terry Farrell - MSWord MVP

"L.Allan" wrote in message
...
I'm trying to right-justify part of a line that I'm generating with a
C++ program. I'm familiar with the the \qr and \qc and \ql to justify
right, center, and left respectively.

If I embed a \qr within a paragraph, then the entire paragraph is right
justified. I want to have just the text after the \qr be right
justified on the same line, and the text before the \qr remain left
justified on the same line.

This is the equivalent of what I want to generate (first part is
standard, simple rtf header):

{\rtf1\ansi\ansicpg1252\deff0\deflang1...
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\nowidc...
Line 1 with standard left justification (slj)\par
Line 2 with slj and then \qr right justified\par
Line 3 with slj\ql\par
Line 4 with standard left justification (slj)\par
Line 5 with slj and then \line\qr right justified\par
Line 6 with left justification\ql\par
Line 7 with left justification
}

You can copy/paste into WordPad to see how the above is "rendered".

I can use \line\qr tags in the 5th line to cause a line-break and then
the rest of the paragraph is right-justified. I want to be able to do
this without the \line tag and have it remain as one line. I want it to
look something like:

Line 1 with standard left justification (slj)
Line 2 with slj and then.......................right justified
Line 3 with slj\ql
Line 4 with standard left justification (slj)
Line 5 with slj and then
.................................................. .......right
justified
Line 6 with left justification
Line 7 with left justification

(above may not have intended alignment because of variable width font.

Thanks








Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can you Justify paragraph except for the last line? Jack B Microsoft Word Help 3 November 9th 07 03:48 AM
Justify last line of a paragraph. smiths4 Microsoft Word Help 2 May 24th 06 04:18 PM
Shift+enter does not justify the last sentence of paragraph?? CondorLB Microsoft Word Help 4 September 29th 05 04:13 AM
Can I justify last line in a paragraph? Sergio Page Layout 3 April 26th 05 06:57 PM
Justify of last line in paragraph Stefan Blom Page Layout 3 April 15th 05 06:53 PM


All times are GMT +1. The time now is 12:42 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"