Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to export text box in excel. When I do that i get only the objectID instead of text.
I have
objectID = TX01
and
text MyTextBox
I got TX01, and i need MyTextBox How to do that.
Any idea?
How about something like this:
sub ExportChart
set cs = ActiveDocument.GetSheetObject("TX01")
msgbox cs.GetText()
set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True
set XLDoc = XLApp.Workbooks.Add
XLDoc.Sheets(1).name = "Exported text object"
set XLSheet = XLDoc.Worksheets(1)
XLSheet.Range("A1") = cs.GetText()
End Sub
This will open a new excel file and store the value of the text object with ID TX01 in the cell A1.
Please let me know if this helps or ir you need something else.
Kind regards,
Can you share the app. Seems to be working for me
How are you exporting your text object?
If i right click on a text object, click send to excel it exports its value correctly not the ID.
Kind regards,
I want to do that using modul...
Hi papepape,
Regards!
Did you tried the Right click and export to excel ?? it should work ...are you trying to export it in any other format ??
I now for right click, but I have task to do that using modul. When press button i need to export text from text box in excel because i need modul...
Hello..
Send to Excel option should work fine.Are you trying to export the data with macro ???
How about something like this:
sub ExportChart
set cs = ActiveDocument.GetSheetObject("TX01")
msgbox cs.GetText()
set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True
set XLDoc = XLApp.Workbooks.Add
XLDoc.Sheets(1).name = "Exported text object"
set XLSheet = XLDoc.Worksheets(1)
XLSheet.Range("A1") = cs.GetText()
End Sub
This will open a new excel file and store the value of the text object with ID TX01 in the cell A1.
Please let me know if this helps or ir you need something else.
Kind regards,
Thanks a lot!!!!!!