Guest_imported
New member
- Jan 1, 1970
- 0
integer result
result = o1.ConnectToNewObject("word.application.9"
IF result <> 0 THEN
DESTROY o1
MessageBox("OLE Error", &
"Unable to connect to Microsoft Word. " &
+ "Code: " &
+ String(result))
DESTROY o1
RETURN
END IF
ole_1.Activate(OffSite!)
ChangeDirectory( "c:\cenk" )
integer li_res
is_cenk =sle_1.text
if is_cenk="" then
messagebox("dikkat","Herhangi bir document adý girmediniz"
return 0
elseif FileExists(is_cenk) = false then
li_res =messagebox("hata","var olmayan document girildi!Yaratmak istermisin?",Question!,YesNo!,1)
if li_res = 1 then
o1.Application.Run("FileNew"
o1.Application.Visible = true
else
return 0
end if
else
is_doc =is_cenk+".doc"
is_cenk ="c:\cenk\"+is_cenk+".doc"
messagebox("Seçilen Dizin",is_cenk)
o1.Application.Visible = true
o1.Documents.Open(is_cenk)
end if
****What i wanna know is, i want 2 convert the code above to open a word document INTO the OLE control and write somethings in the document then save it with changes.But i couldnt manage!!! above code opens document not IN an OLE control.WOULD YOU PLEASE HELP ME !THANKS
result = o1.ConnectToNewObject("word.application.9"
IF result <> 0 THEN
DESTROY o1
MessageBox("OLE Error", &
"Unable to connect to Microsoft Word. " &
+ "Code: " &
+ String(result))
DESTROY o1
RETURN
END IF
ole_1.Activate(OffSite!)
ChangeDirectory( "c:\cenk" )
integer li_res
is_cenk =sle_1.text
if is_cenk="" then
messagebox("dikkat","Herhangi bir document adý girmediniz"
return 0
elseif FileExists(is_cenk) = false then
li_res =messagebox("hata","var olmayan document girildi!Yaratmak istermisin?",Question!,YesNo!,1)
if li_res = 1 then
o1.Application.Run("FileNew"
o1.Application.Visible = true
else
return 0
end if
else
is_doc =is_cenk+".doc"
is_cenk ="c:\cenk\"+is_cenk+".doc"
messagebox("Seçilen Dizin",is_cenk)
o1.Application.Visible = true
o1.Documents.Open(is_cenk)
end if
****What i wanna know is, i want 2 convert the code above to open a word document INTO the OLE control and write somethings in the document then save it with changes.But i couldnt manage!!! above code opens document not IN an OLE control.WOULD YOU PLEASE HELP ME !THANKS