cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Excel VBA set note text

ChiselnMallet1
12-Amethyst

Excel VBA set note text

HI Folks... I have been successful in getting a line of text from a note... but have failed miserably trying to change that note text to something else.  Could I get some help for the next lines of code?  I need to Set detText to a new string.

 

Set detItemOwner = drawing
'this sets the note object to the particular type and id - IpfcDetailNoteItem
Set note = detItemOwner.GetDetailItem(1, 463)
'this sets the object to contain the note instructions/settings
Set noteInst = note.GetInstructions(False)
'this sets the object to the textlines - IpfcDetailTextLines
Set dettextLines = noteInst.textLines
'Setting the variable to the count to show in xl as proof we have the right note
lineCount = dettextLines.Count
'print to xl
Range("B3") = lineCount
'Setting the object to the text of index 1 (line 2) - IpfcDetailTexts
Set dettexts = dettextLines.item(1).texts
'setting object to the text item 0... know idea why there is an index there - IpfcDetailText
Set detText = dettexts(0)
'set a variable to the note text
newStr = detText.text
'print to xl
Range("B3") = newStr

0 REPLIES 0
Announcements


Top Tags