BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-05-2005, 05:59 AM   #1 (permalink)
New Member
 
Join Date: Aug 2005
Model: 7230
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Working with Word attachments - how to get text

Please Login to Remove!

Hi,

I'm attempting to retrieve the text using the mail API from a Word attachment (I'm using BES + the attachment service in case that's important).

I can get hold of the attachment & it reports the correct filename and is of type UnsupportedAttachmentPart

Calling getContent() on this returns an object of type DocViewAttachmentPartModel ... for which I can find no information at all...

Does anybody have any idea how to get hold of the text of a Word attachment ?

thanks for any help
Pete

Code:
Multipart cont = (Multipart)m.getContent();

System.out.println("# attachments: " + cont.getCount());

if(attachmentNumber < cont.getCount()) {
			
	UnsupportedAttachmentPart bp = (UnsupportedAttachmentPart)cont.getBodyPart(attachmentNumber);
								
	System.out.println("filename: " + bp.getName());				
	System.out.println("size: " + bp.getSize());
			
	if(bp.getName().equals(filename)) {				
		attachText = bp.getContent();
				
		System.out.println(attachText.getClass().getName());
	}
}
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

(5PCS) M24C64-FMC6TG IC EEPROM 64KBIT 400KHZ 8MLP 24C64 M24C64
$5.31
(5PCS) M24C64-FMC6TG IC EEPROM 64KBIT 400KHZ 8MLP 24C64 M24C64 picture(1PCS) 24LC512-I/P IC EEPROM 512KBIT 400KHZ 8DIP 24LC512-I 24LC512
$2.65
(1PCS) 24LC512-I/P IC EEPROM 512KBIT 400KHZ 8DIP 24LC512-I 24LC512 picture(1PCS) PIC16LF87-I/SS IC MCU FLASH 4KX14 EEPROM 20SSOP PIC16LF87-I 16LF87 PIC16L
$5.86
(1PCS) PIC16LF87-I/SS IC MCU FLASH 4KX14 EEPROM 20SSOP PIC16LF87-I 16LF87 PIC16L picture(1PCS) CAT1027WI-28-GT3 IC SUPERVISR CPU 2K EEPROM 8SOIC 1027 CAT1027
$1.84
(1PCS) CAT1027WI-28-GT3 IC SUPERVISR CPU 2K EEPROM 8SOIC 1027 CAT1027 picture(5PCS) CAT25320YI-GT3 IC EEPROM SER 32KB 10MHZ 8TSSOP 25320 CAT25320
$4.73
(5PCS) CAT25320YI-GT3 IC EEPROM SER 32KB 10MHZ 8TSSOP 25320 CAT25320 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.