bellman101
Board Regular
- Joined
- Aug 20, 2012
- Messages
- 245
Hi all,
I am writing a workflow program for my work. It essentially creates a rounded rectangle auto shape for each new ticket. It then populates the text of the ticket with the ticket number and summary text. This was working fine on several machines including my own (all running Office 2007), but not on some others. On investigation, it will not work on any machines with SP2. I upgraded my machine to SP3 as a test but now I get the same error.
Does anybody know of a workaround as I don't think I could get all machines rolled back to having no service pack.
Here is the snippet of code where it is sticking. Note it gets through the two lines of '.TextFrame.Characters.Font.' without an issue, but then stops at the following: .TextFrame.Characters.Text = TICKET & ": " & SUMM.
I have tried every possible variation. I have tried changing to .select and then selection.text = "text" but this generates a similar error of 'Unable to set the text property of the rectangle class'.
Please if anyone could help that would be great as I'm verging on insanity here!!
Thanks
James
I am writing a workflow program for my work. It essentially creates a rounded rectangle auto shape for each new ticket. It then populates the text of the ticket with the ticket number and summary text. This was working fine on several machines including my own (all running Office 2007), but not on some others. On investigation, it will not work on any machines with SP2. I upgraded my machine to SP3 as a test but now I get the same error.
Does anybody know of a workaround as I don't think I could get all machines rolled back to having no service pack.
Here is the snippet of code where it is sticking. Note it gets through the two lines of '.TextFrame.Characters.Font.' without an issue, but then stops at the following: .TextFrame.Characters.Text = TICKET & ": " & SUMM.
I have tried every possible variation. I have tried changing to .select and then selection.text = "text" but this generates a similar error of 'Unable to set the text property of the rectangle class'.
Code:
With ActiveSheet.Shapes(TICKET)
.Top = Cells(RW, CLn).Top
.Left = Cells(RW, CLn).Left
.Width = Range("E8").Width
.Fill.ForeColor.RGB = Sheets("JOBS").Range("A:A").Find(TYP).Offset(, 1).Interior.Color
.TextFrame.Characters.Font.Color = Sheets("JOBS").Range("D1").Interior.Color
.TextFrame.Characters.Font.Size = 8
.TextFrame.Characters.Text = TICKET & ": " & SUMM
.TextFrame2.MarginLeft = 0.02
.TextFrame2.MarginRight = 0.02
End With
Please if anyone could help that would be great as I'm verging on insanity here!!
Thanks
James
Last edited: