WDK and MS-Word through OLE

Hi,
I am doing OLE to MS-Word to generate some letters. WDK gives an error
message 'File Not found' when executing 'LinkTo()' function. But the
file does exists in the specified path. Could anybody suggest a work
around?

Here is the code:

ls_doc_name = "c:\charts\cse0007.doc"

// check whether the document is existing
lb_fileexists = FileExists(ls_doc_name)
CHOOSE CASE lb_fileexists
	CASE FALSE
		MessageBox("Error", ls_doc_name + " Not found",StopSign!)
		Return FALSE
END CHOOSE

//ole_docword is an OLE control with Object Type as Word Document,
placed in the window.
li_Ret = ole_docword.Linkto(ls_doc_name) ===>FAILS HERE
 
CHOOSE CASE li_Ret
   CASE -1
      MessageBox("Error", ls_doc_name + " not found for Linking to the
OLE object", StopSign!)
      Return FALSE
   CASE -2
      MessageBox("Error","Item not found for Linking", StopSign!)
      Return FALSE
   CASE -9
      MessageBox("Error","Unable to Link " + ls_doc_name + " to the
OLE control", StopSign!)
      Return FALSE
END CHOOSE

Return TRUE

ole_docword.Activate(InPlace!)

Thanks in advance
Mahesh
402-471-6751(Work)

0
Mahesh
9/29/1999 6:13:26 PM
sybase.webdeploykit 728 articles. 0 followers. Follow

0 Replies
633 Views

Similar Articles

[PageSpeed] 9
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

WDK and MS-Word through OLE #2
Hi, I am doing OLE to MS-Word to generate some letters. WDK gives an error message 'File Not found' when executing 'LinkTo()' function. But the file does exists in the specified path. Could anybody suggest a work around? Here is the code: ls_doc_name = "c:\charts\cse0007.doc" // check whether the document is existing lb_fileexists = FileExists(ls_doc_name) CHOOSE CASE lb_fileexists CASE FALSE MessageBox("Error", ls_doc_name + " Not found",StopSign!) Return FALSE END CHOOSE //ole_docword is an OLE control with Object Type ...

Word ole: How to close MS word
I have ole control on the window and inset file using Ole_control.InsertFile(file_name) When I close the window I still see the word running in task manager. How do I close Word? How about looking at the Quit method? Katarina wrote: > I have ole control on the window and inset file using > Ole_control.InsertFile(file_name) > > When I close the window I still see the word running in task > manager. How do I close Word? ...

OLE and MS Word
Hello, I'm looking for a simple application that creates a Word document (*.doc) and writes some text there without opening Word and then closes the connection to that OLE object... Thanks in advance... Have you tried looking at http://www.sybase.com/detail?id=47980 Just a hint. You can search the Sybase tech docs from http://www.sybase.com/support/techdocs Good luck, Terry [TeamSybase] and Sequel the techno-kitten On 3 Feb 2004 02:40:13 -0800, "Piotr Nadolny" <pnad@o2.pl> wrote: >I'm looking for a simple application that creates ...

OLE with MS Word
Hello all, Where can I find a list of Active X commands to control MS word. I'm trying to do: ole_1.Object.SaveAs("c:\test.doc") but "Save As HTML" instead. I would like to find a list of all the commands to carry out various functions. Thanks for reading! Rick This is all wriiten down in the Office developers books. Best place to search on the internet is http://msdn.microsoft.com HTH -- - Eric Aling [TeamSybase], Avalix Information Systems, The Netherlands Eric's Home & PB Site @ http://www.knoware.nl/users/cypr115 ...

OLE (MS-Word) Control
Hi everybody! I hope I say this all correctly, cause I have only about 6 months experience with PowerBuilder. I'm using version 6.5.1 of PowerBuilder... I have a datawindow where I have placed an OLE control (an MS-Word doc built in Office 97) in the detail band of the datawindow. The Word document is "linked" not "imbeded". The idea is to merge some addresses (Sybase columns) with the Word doc and print it. All of that works great, however once I print the datawindow (using PFC_PRINT), my mouse will appear normal, but clicking on anything, anywhere in...

MS Word OLE Problem
I am trying to get page count from a Word document. I have a macro that will get the 'accurate' page count and I want it to return the page count to where I called it in my Powerbuilder application. The following powerbuilder function is what I am using to call the Word macro: //************************************************************************ long l_pages OLEObject ole_word ole_word = CREATE oleobject l_pages = 0 IF ole_word.ConnectToNewObject("word.application.9") = 0 THEN ole_word.Visible=TRUE ole_word.Documents.open("C:\\Temp\test....

OLE to MS Word for Spellchecking
I'm starting an OLE instance of Word (version 10) to take advantage of it's spell checking feature. This works fine except for when I ADD a new document to Word. The ADD function wants to be visible by default. We don't want the user to see anything except the Checkspelling dialog if it finds and word in question. I've searched around and found that there are some parameters for the ADD statement. In fact, the fourth paramater is the visibility value. I've been trying various combinations of passing parameters or a parameter string through my OLE object to Word...

OLE (MS-Word) Control
Hi everybody! I hope I say this all correctly, cause I have only about 6 months experience with PowerBuilder. I'm using version 6.5.1 of PowerBuilder... I have a datawindow where I have placed an OLE control (an MS-Word doc built in Office 97) in the detail band of the datawindow. The Word document is "linked" not "imbeded". The idea is to merge some addresses (Sybase columns) with the Word doc and print it. All of that works great, however once I print the datawindow (using PFC_PRINT), my mouse will appear normal, but clicking on anything, anywhere in...

MS word document as an OLE
I am using PB 7.02 Build 8046 and Oracle 8i. I want to have MS Word document as an OLE object in DW.I want to save it from MS word back to the DW and ultimately to the database. Which datatype should I use in my table for that ? I tried to create a table with clob datatype column for that,but PB wants longraw datatype column. Will I be able to update Word document contents in that column if it is of Longraw datatype. Can anyone help me how to update in that case? Thanks, Namita Having reached this far, why dont you try and see what happens and let us know the result. I...

PB
Helo, I have following problem. I want only to write some data read from DB in PB to a Word docment and then to print it out. I am using OLE - everything is OK - I am connected to MS Word, the file is opened, I can even print it ...., but I can't manage to write on a bookmark. I have already tried following, but nothing works: ole_word.object.Application.ActiveDocument.Bookmarks("testbook").Range.Text = "test value" Since I know that there can be troubles with bookmarks (defined x notdefined) in Word I thought that maybe it could be better to use the boo...

OLE, MS Word, PB
I want to use OLE control to display an existing MS word document inside a powerbuilder response window. I used ole_1.InsertFile(filename) and displayasactivexdocument!, I can see the document, but the word's toolbar, menu, status bar all being displayed. How do I hide them but still have scrollbars? If I define as displayascontent!, the document has very small font, no scrollbars, and it is not readable. Please advice how to do this. I do not need to edit nor save the document. Dear "Joy"! There is some way to hide all the commandbars in word ( when ole-c...

OLE --> MS Word question
Hi, We have a mail merge feature that we would like to improve so it can do multiple merges to the client's printer during after hours. However I have 2 problems. Our merges can range from several to several thousand records. The larger the merge the longer it takes for MS Word to build the merge and then spool it to the printer, before it is free to the next one. Since this needs to run unattended I believe I need to figure out... A) how to tell when MS Word has finished spooling and is free to begin the next merge and... B) how to make my PB code wait for the condition to ha...

Help required with OLE to MS Word
I'm having difficulty doing a ConnectToNewObject ( "word.application.8" ) to MS Word. The function is returning -3 which according to the PB Help file means "Object could not be created". This works fine on one machine yet on another I get the error. I'm using the same version of MS Word on both machines (MS Word 97 version SR2). Can someone please advise why I'm getting this error or why the "object could not be created"? Thanks, LM ...

Using OLE to open MS Word
I am using Powerbuilder 6.5.1 using OLE to open MS Word from an application but it does not appear to be working. Can anyone help? The user has WIndows 98 and using MS Word 2000. This was working on a previous installation of MS Word but has now installed 2000 and no longer works. Regards David Price Technical Support ABI Building Data Ltd www.abibuildingdata.com DDI: 0151 353 3506 FAX: 0151 353 3505 Word marks a document as "dirty" when the user makes any changes. It also has exclusive access to "dirty" documents, and shared access to "clea...

Web resources about - WDK and MS-Word through OLE - sybase.webdeploykit

How I learned to say, 'Hi, Google Docs; bye, MS Word'
Do I really need all those features? No. And so I've created my last document in Microsoft Word, a product I first began using 27 years ago. ...

Editing Docs in MS Word and Saving Them Back To Your Rails Site Using WebDAV
I recently made a proof-of-concept to get MS Word to edit documents in a Rails app and save them back to the server, using Devise for authentication. ...

CloudOn Released for Android – Create MS Word, Excel, and PowerPoint Documents While On the Go
... cloud storage services like Dropbox , Box, and Google Drive . Once connected to your online storage, you can then create/edit Microsoft Word, ...

PDF Shaper - PDF 轉 MS Word(rtf 格式)
想要將 PDF 文件轉成微軟 Office 的 Word 格式,方便後續的編輯,可以來試試 PDF Shaper 這套 PDF 轉 MS Word(rtf 格式)的免費應用軟件,除了支援單一 PDF 檔案全部或指定頁數的轉換...

Microsoft loses appeal: can't sell MS Word
Federal judge affirms i4i's patent infringement judgment against Microsoft

MS Word’s Spell Check Still Flags “Obamacare”
Maybe that’s with good reason. The latest incriminating—well-written, too, I dare say—account I’ve read of the Patient Protection and Affordable ...

Podcast: Outliners vs MS Word
A bunch of people were discussing outliners vs MS Word on Facebook the other day, and I was just working on one of my apps, in my outliner of ...

New Adobe Flash zero day in the wild - infects through MS Word documents
Adobe has released an advisory warning users about a new zero day flaw in their ubiquitous Flash Player software. Watch out for malicious Word ...

In A Bid To Be The MS Word Of The Mobile Generation, Quip Adds Better Search, URL Links
Quip, a mobile-friendly word processing app co-founded by the ex-CTO of Facebook Bret Taylor and ex-Googler Kevin Gibbs, has picked up some 5,000 ...

MS Word deserves DEATH says Brit SciFi author Charles Stross
... inconsistent dictator' British science fiction author Charles Stross has published a mighty rant on the subject of Microsoft Word, which he ...

Resources last updated: 12/21/2015 7:10:57 AM