Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm wasting a lot of time trying to find or figure out how to create and apply a text style to a new note. I'm using the following code to create a new note but I can't get it to use a new text style so I can format it differently.
I would also accept if it's possible to add rotation in the styleoverride in the formattedtext of a note. I've tried adding it but it doesn't seem to affect anything unlike the fontsize which appears to work.
Dim invDoc As Document Set invDoc = ThisApplication.ActiveDocument Dim stext As String
'The rotation override sadly does not seem to work at any value I've tried, other wise I'd just use this method stext = "<StyleOverride FontSize = '0.1524' Rotation = '90'>PRINTED: " & Now() & "<Br/>BY: " & ThisApplication.GeneralOptions.UserName & "</StyleOverride>" ' Set a reference to the GeneralNotes object Dim oGeneralNotes As GeneralNotes Set oGeneralNotes = invDoc.ActiveSheet.DrawingNotes.GeneralNotes Dim oTG As TransientGeometry Set oTG = ThisApplication.TransientGeometry Dim oGeneralNote As GeneralNote Set oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(0.3, 1.5), stext)
Solved! Go to Solution.