| View previous topic :: View next topic |
| Author |
Message |
Cosmic P OOo Enthusiast

Joined: 23 Mar 2005 Posts: 186
|
Posted: Wed Apr 20, 2005 2:36 am Post subject: Changing string format (font weight, etc.) |
|
|
Can I change the properties of a text?
Can I also do this for the contents of a user field? |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3622 Location: Columbus, Ohio, USA
|
Posted: Wed Apr 20, 2005 6:56 am Post subject: |
|
|
Read Setting Text Attributes in my free macro document. _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
|
| Back to top |
|
 |
Cosmic P OOo Enthusiast

Joined: 23 Mar 2005 Posts: 186
|
Posted: Wed Apr 20, 2005 9:58 pm Post subject: |
|
|
Well I tried a few things, but what I actually wanted to do, seems impossible.
I'm making a few multi languange templates for the office. The user can choose between English, German and French. All the information is put into arrays and will be inserted automatically.
The texts will be put into user fields like this:
line1 & Chr(13) & line2 & Chr(13) & line3
All should be formatted differently. Therefor I'd like to format the variables before there put into the user field, but this seems impossible because CharHeight(), CharColor(), etc. only apply to object type variables, and not to string type variables.
Possibly I could put some routine together to select the text with a TextCursor() by using the functions Mid() and Len(), but isn't there an easier way?
Or would it be possible to simply select all the contents of a user field? |
|
| Back to top |
|
 |
Ernst Lustig General User


Joined: 06 Apr 2005 Posts: 29 Location: Stuttgart, Germany
|
Posted: Thu Apr 21, 2005 3:38 am Post subject: |
|
|
Sounds amazing, but it is obviously not possible to pass along the formatting properties together with the content.
But since you must know the content and where to put the content, it should be easy to select the content immediately after inserting and apply formatting. |
|
| Back to top |
|
 |
Cosmic P OOo Enthusiast

Joined: 23 Mar 2005 Posts: 186
|
Posted: Sun Apr 24, 2005 11:36 am Post subject: |
|
|
I somehow can not create a text cursor within a user field. No matter what I try, nothing works here: "object variable not set", "variable already defined differently", "invalid use of method", "property or method not found", ...
Any help? |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3622 Location: Columbus, Ohio, USA
|
Posted: Tue Apr 26, 2005 9:09 am Post subject: |
|
|
| Quote: | | I somehow can not create a text cursor within a user field |
You are correct, you can not do this. You might consider using bookmarks instead, and then insert the text content at the bookmark. _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
|