AnsweredAssumed Answered

Copying Notes with Numbering

Question asked by Jeremy Raymar on Mar 15, 2016
Latest reply on Mar 16, 2016 by Jeremy Raymar



I am working with the SolidWorks API (in the VBA editor), trying to create macros to update drawings. What I am attempting to do is use VBA to copy all the notes in an old drawing, then create a new document and paste the copied values in that document. This mostly works, but I am having trouble copying notes that have numbering and other special formatting in them. When the text is written to the new document, it doesn't preserve any special formatting.


The methods I am using are as follows:

noteText = swNote.GetText 'In "old" document

swNote.SetText (noteText) 'In "new" document


My guess is that the note.GetText method only copies text without formatting, so note.SetText will lose any numbering/bullets/etc that was in the previous note. Is there a way to copy note text while still preserving formatting, or perhaps an alternative way to transfer notes between documents that will? Thank you all for your time, and your help is greatly appreciated.