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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Excel VBA set note text

ChiselnMallet1
14-Alexandrite

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