![]() |
#1
|
|||
|
|||
![]()
Hello,
I'm totally clueless. I'm added a textfield in a way like this : Set ShAuthor = DC.Shapes.AddTextbox(Orientation:=msoTextOrientati onHorizontal, Left:=50, Top:=50, Width:=100, Height:=100) With ShAuthor .Fill.ForeColor.RGB = RGB(209, 209, 209) .Left = Psu.PageWidth / LOGO_SHIFT_TO_RIGHT_REL .Top = -1 * (Psu.TopMargin - 15) + CentimetersToPoints(7) .Width = CentimetersToPoints(10) .Height = CentimetersToPoints(1) .TextFrame.TextRange.Text = "Author : " & "TestAuthor" .TextFrame.TextRange.Bold = True .TextFrame.TextRange.Font.TextColor = RGB(0, 80, 113) I works fine, the same code in an other document, the red marked line could not be executed, because <Dieser Befehl ist nicht verfügbar.> or The command is not available. Same code, different results... I don't know why ... can anybody help ??? THX Andreas |
#2
|
||||
|
||||
![]()
The code works fine for me (after adding the missing 'End With').
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hello,
I've copied the important lines only, the problem is the Font - object. For example .lines .fill are diabled, the tested Code was execute on a empty word file ( it worked ) and on a huge word file ( it didn't work ). I'm just want to colorize the font by RGB... no way. I think it has something to do with the pagesetup, but I don't no what ![]() Any other idea ? Thanks a lot for reading the issue ... Andreas |
#4
|
||||
|
||||
![]()
As I've said, the code works for me. Perhaps your document has some form of corruption or there's a fault in your Office installation.
Corrupt documents can often be 'repaired' by inserting a new, empty, paragraph at the very end, copying everything except that new paragraph to a new document based on the same template (headers & footers may need to be copied separately), closing the old document and saving the new one over it. A faulty Office installation can be repaired via Start > Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change>Repair.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Hello,
I think, I've got the Solution, but for the problem itself, still I'm clueless .. Dim Rn as Range .TextFrame.TextRange.Text = "Author : " & H_Author Set Rn = .TextFrame.TextRange Rn.Font.Color = 9786419 This works fine, but I don't know why ... Thank you for reading my problem !!! Greetings from Berlin Andreas |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
Macro to find coloured text and replace with form-field/formtext containing that text | tarktran | Word VBA | 1 | 11-26-2014 08:12 AM |
Chart Formating with ChartTitle Font and DataLabel Formating | shilabrow | Excel Programming | 0 | 06-30-2014 10:01 AM |
![]() |
olson109 | Word | 5 | 03-12-2014 01:02 AM |
Unable to enter text in text field | yewee | Word | 0 | 08-06-2010 03:20 AM |