How do I change some text in an OmniGraffle document via AppleScript without changing the text's styling?
To not change the color, font size and other styling attributes : You must use classes in Text Suite or in Extended Text Suite.

Like this :


tell application "OmniGraffle Professional 4"
   set someGraph to solid 1 of canvas 1 of document 1

  --set word 1 of text of someGraph to "Hello"
  --set characters 1 thru 4 of text of someGraph to "Hello"
  --set attribute run 1 of text of someGraph to "Hello"
  set paragraph 1 of text of someGraph to "Hello World"
end tell