Solved

RTF Alignment

Posted on 1998-08-20
10
538 Views
Last Modified: 2008-03-17
There does not appear to be any way to align both margins of a paragraph using RTF control. Has anyone got code to do this.
0
Comment
Question by:sbmc
  • 5
  • 4
10 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1430135
What is it your are trying to accomplish?
0
 
LVL 2

Author Comment

by:sbmc
ID: 1430136
Im trying to align both margins of a paragraph as in Word.
0
 
LVL 1

Accepted Solution

by:
blwatkins earned 200 total points
ID: 1430137
There is no way to make a RTF control do what you want, The correct words is "Full Justification" this will make both sides of the text be alligned.  

The only way to achieve this is to Use the Microsoft Control "OLE" and make its .class be a word document.  Then you can format the text inside of the control with any formating you can do in word (such as : Full Justification).  This box will look just like a text box control.


0
 
LVL 2

Author Comment

by:sbmc
ID: 1430138
Can you elaborate on the OLE solution ie code example.

Thanks
0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1430139
don't need any code to perform this.  Just open vb, drop an ole object on the form, and pick work from the object type.  Put your text in the box, Highlight the text and right click for a menu and select paragraph formating, and change it from left alignment to "Justified",

Let me know if this isn't enough.

Thanks Brad.

0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 2

Author Comment

by:sbmc
ID: 1430140
Brad

I've tried using the OLE object but how do you resize it and save the data you enter.


Thanks


Dave
0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1430141
you want to resize the control at runtime?  and save the data at runtime or at developmnet?

0
 
LVL 2

Author Comment

by:sbmc
ID: 1430142
The OLE object seems to determine its own size at run time regardless of the size you  initially create it. At runtime the File menu is not present so how do you save the data?

0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1430143
Use the OLE Save to FILE Statement to save it.
and the resize the control in the Form.Load event.

Make sure to do a DoEvents after resizeing the form.

0
 
LVL 2

Author Comment

by:sbmc
ID: 1430144
OK thanks for your help.


Dave
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now