Home » Developer & Programmer » Forms » Problem with integrating .doc file (10g Application Server win xp)
Problem with integrating .doc file [message #341092] Sat, 16 August 2008 06:32 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

I am trying to create mailers for customers from forms (using MS Word) but not able to integrate it properly.

Attached is the error which occurs when I try to open the template for the mailer. As seen I have mentioned the template name (template.doc - kept in the MSOffice home) in the text box (Template Document), whenever I do this it gives me the error but without it MS Word opens properly.

The 'Launch Word' button code (mentioned below) uses the template to launch MSword so I cannot avoid writing a name in the template text box.

declare
location varchar2(256);
begin
	
	if :global.application_id is not null then
		message('This application is already open');
	else
		location:= 'C:\Program Files\Microsoft Office\office11\winword.exe'||:blk_customer.txt_template;
		:global.application_id:=dde.app_begin(location, dde.app_mode_normal);
	end if;
	
	exception
		when dde.dde_app_failure then
		 message(' Failed to launch the application ');    
	   raise form_trigger_failure;
	
	  when others then
	   message ('Error; '||to_char(sqlcode)||' '||sqlerrm);
	   raise form_trigger_failure;
	
end;


What can be reason for this? Can you suggest corrective measures for this to function properly?
Re: Problem with integrating .doc file [message #341160 is a reply to message #341092] Sun, 17 August 2008 06:35 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Read the Forms Builder Help on DDE.APP_BEGIN and see the example.
Re: Problem with integrating .doc file [message #341178 is a reply to message #341160] Sun, 17 August 2008 09:56 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks for the reply Mudabbir but I am still having problems.

Here is a relevant part I got from the online help

Quote:
The DDE server application program name may be followed by arguments, which should be separated from the application program name with a space.


I changed a few things as shown below

location varchar2(256) changed to appl_name varchar2(256)

Quote:
/*to avoid confustion*/

.
.
.
appl_name:= 'C:\Program Files\Microsoft Office\office11\winword.exe'||(space):blk_customer.txt_template;


then tried

appl_name:= 'C:\Program Files\Microsoft Office\office11\'||:blk_customer.txt_template;


but still when I put the template name (template.doc) in the text box and run this code it gives the same error.

Can you tell me where I am going wrong? I want the template.doc to open instead of the winword.exe (which opens if I do not put the template name in the text box)
Re: Problem with integrating .doc file [message #341184 is a reply to message #341160] Sun, 17 August 2008 12:47 Go to previous message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
ok I changed the line and it seems to be working

appl_name:= 'C:\Program Files\Microsoft Office\office11\winword.exe (space)d:\template.doc


I changed the location of the template file and changed the approach of taking the document name from the form. I am not able to understand why it did not work but for now I am moving ahead.

Previous Topic: Developer 6i & Windows Vista
Next Topic: Upload Excel file to Oracle Database
Goto Forum:
  


Current Time: Mon Feb 10 00:13:03 CST 2025