cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Open the Word Document

Former Member
0 Kudos

Hi Experts,

I have a scenario to generate word document with the information comming from R/3 into bookmarks located in the document. This we are doing with WordML. We have uploaded WordML templates to server and at the run time we are getting the content from those templates replacing book marks with corresponding data comming from R/3.

Once we replace all those book marks and we are writing into another ".doc" file and opening the same ".doc" file in another window.

This functionality (opening document in another window) is working fine in my system (runnig with MicroSoft Word2003). Where as in another systems (runnig with MicroSoft Word2007) is not working, in that system it's opening new window and immediatly it's closing with out waiting to chose either "Open", "Save" or "Cancle" option from user.

Following is the code used for this purpose:

IWDCachedWebResource cachedWebResource=WDWebResource.getWebResource(inp,WDWebResourceType.DOC);

cachedWebResource.setResourceName("XXXXXXXXXX.doc");

wdComponentAPI.getWindowManager().createNonModalExternalWindow(cachedWebResource.getURL(),"XXXXXXX.doc").open();

NOTE: inp is the inputstream which contains the content that has to open in the final ocument.

Please help me out in where exactly it's causing the problem.

Thanks,

Udaya Dumpa.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Udaya Dumpa,

I am currently working on a project of my own where I would need to open different versions of Word documents using different version of office.

I am using the method cl_gui_frontend_services=>EXECUTE and just passing the location and file name to the parameter document.

I have tested this and so far have no problems.