Hi,
We have just brought a copy of Aspose.Words for Java and I have noticed that images are being removed when saving the document after performing an update. Looking at past forums I noticed that this was a known issue. Is this still the case?. I am using version 2.1.0.0 which I downloaded on 7/6/2007.
I have attached the code and word documents for your reference
Cheers
package mypackage1;
import com.aspose.words.*;
import java.sql.*;
import java.io.*;
import oracle.jdbc.*;
import java.text.Format;
import java.text.DecimalFormat;
import java.text.*;
public class WordTest
{
public WordTest()
{
}
public static void main(String [] args)
{
try
{
com.aspose.words.License license = new com.aspose.words.License();
license.setLicense("c:/Aspose.Words.lic");
Document doc = new Document("c:/FOP For Non-Commercial Thinning.doc");
String sqlStatement = "";
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection();
Statement st = conn.createStatement();
ResultSet results;
String[] fieldnames = doc.getMailMerge().getFieldNames();
results = st.executeQuery("select b.operator as contractor,asset_name as assetname,c.short_description as assetowner,b.planned_net_quantity as plannednetquantity,b.operation_id as operationid, d.planned_retained_spha as plannedretainedspha, e.short_description as fallingmethod from asset a,operation b, asset_owner_lookup c ,non_commercial_thinning d, nct_method_lookup e where a.asset_id = b.asset_id and a.asset_owner_code = c.asset_owner_code (+) and b.operation_id = d.operation_id "+
" and d.falling_method = e.method_code (+) and b.operation_id = 406367" );
doc.getMailMerge().executeWithRegions("NonCommThin",results);
results = st.executeQuery("select b.operator as contractor,to_char(b.operation_start_date,'dd/mm/yyyy') as operationdate,d.distname as district from asset a,operation b,block c,districtro d where a.asset_id = b.asset_id "+
" and a.block_id = c.block_id and c.district_code = d.distcode and b.operation_id = 406367" );
doc.getMailMerge().execute(results);
doc.save("C:/newword.doc");
}
catch (Exception e) {System.out.println(e.toString());}
}
}