Help Needed for - Using Ms Word OLE in Powerbuilder??

Using Ms Word OLE in Powerbuilder?? 
I have one report which I wanted to be in Word document. Although it is not 

exactly mailmerge, I want to replace few of the fields in the word document 

with the database fields.

The problem I am facing is Word says 
'Name not found calling external function goto at line ...'

I tried using Word 97 / Word 2000 ( PB version is 6.5)

The code I wrote is

////////////////////////////////////
OLEObject ole_object

ole_object = CREATE OLEObject

li_rtn = ole_object.ConnectToNewObject("word.application.8")

if li_rtn = 0 then
    ole_object.Documents.Open("D:\This.DOC")
else
  Messagebox("OLE Error","Unable to start an OLEserver process! -  -- " + 
string(li_rtn),Exclamation!)
  Return -1
end if

Ole_object.visible = TRUE

ole_object.editgoto("<NAME>")
ole_object.insert("XYZ")

ole_object.ActiveDocument.close
ole_object.DisconnectObject() // disconnect from word
/////////////////////////

Did anybody tried using PB 6.5 and Word 2000? Is it the problem with the 
versions?

Your reply will be appreciated
Thanks in advance

Rajesh

0
rajeshgarge
11/8/2000 2:29:11 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

2 Replies
1819 Views

Similar Articles

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

Try this code:

ole = create oleObject
ole_var = ole_word97
ole.connecttonewobject("word.application")
ole.application.windowstate = 1
ole_var.activate (inplace!)

//Open the "Document"
ole_var.object.application.wordbasic.fileopen(filepath)

Good luck,
Alex Frisman

rajeshgarge@hotmail.com wrote:

> Using Ms Word OLE in Powerbuilder??
> I have one report which I wanted to be in Word document. Although it is not
>
> exactly mailmerge, I want to replace few of the fields in the word document
>
> with the database fields.
>
> The problem I am facing is Word says
> 'Name not found calling external function goto at line ...'
>
> I tried using Word 97 / Word 2000 ( PB version is 6.5)
>
> The code I wrote is
>
> ////////////////////////////////////
> OLEObject ole_object
>
> ole_object = CREATE OLEObject
>
> li_rtn = ole_object.ConnectToNewObject("word.application.8")
>
> if li_rtn = 0 then
>     ole_object.Documents.Open("D:\This.DOC")
> else
>   Messagebox("OLE Error","Unable to start an OLEserver process! -  -- " +
> string(li_rtn),Exclamation!)
>   Return -1
> end if
>
> Ole_object.visible = TRUE
>
> ole_object.editgoto("<NAME>")
> ole_object.insert("XYZ")
>
> ole_object.ActiveDocument.close
> ole_object.DisconnectObject() // disconnect from word
> /////////////////////////
>
> Did anybody tried using PB 6.5 and Word 2000? Is it the problem with the
> versions?
>
> Your reply will be appreciated
> Thanks in advance
>
> Rajesh

0
Alex
11/8/2000 3:58:30 PM
Does anybody has any idea of how to set the value of a checkbox in a word 
document using OLE object?

I am using PB 6.5 & Word 97/2000

I tried using following syntax, but it gives error for Formfields

ole_object.ActiveDocument.FormFields("CheckBox1").CheckBox.Value = True

Any ideas are welcomed.

Thanks in anticipation
0
rajeshgarge
11/9/2000 9:18:16 PM
Reply:

Similar Artilces:

Powerbuilder to MS Word via OLE is slow
Our application has used Word through an OLE connection for many years. It was always sort of slow but recently we upgraded from Word 95 to Word XP and it got much slower. With Word 95 it took about 15 seconds to connect, load a template, open a document and populate with data. Now that same process takes about 40 seconds with Word XP. A typical user machine is 433mhz with 64 mb RAM. Doubling the RAM gets us back down to about a 15 second response time. The problem is that we have 800 users and no money in the budget to add RAM to 800 machines. I am wondering if any of you hav...

can powerbuilder ole 2.0 with MS word possibly suck as bad as it seems to?
i've been trying to support what should ostensibly be a very simple procedure using ole automation with ms word 6.0 as the server. as far as i can tell, unless i'm really crazy, the same line(s) of code produce different results, randomly. moreover, pb 5.0 doesn't seem to support the majority of wordbasic's functionality due to its "function" format as opposed to wordbasic's dot format, i.e. editgoto() vs. editbookmark.Name = "schmoe", .SortBy = 0, .Goto Insert "Joe". does anyone know whether or not pb 5.0 (enterprise) has a crappy ole...

Ole Word and Powerbuilder
Please help if someone knows how to convert Visual Basic commands to Powerbuilder. I create bookmarks on the fly and populate them with descriptions. Some descriptions I have to insert with tabbing or indentions. I need correct syntax for Powerbuilder. What I used is not working. For example: iole_object.Selection.Font.Underline = False iole_object.Selection.Font.Bold = False iole_object.Selection.TypeParagraph These commands are fine. I have no problems. Powerbuilder doesn't accept commands like : 1) iole_object.Selection.Paragraph.TabIndent or iole_object.Se...

OLE From Word To PowerBuilder
Hello All, I have been having a problem, I have a PB App that uses Word to open documents stored in a database. When a document is open, a Word macro is executed that searches the letter for a place where there needs to be a signature. If there is a signture needed, it communticates back to PowerBuilder that the current user signature is needed. It works great with DDE, but I run into a problem with OLE. How do cummunicate with a PowerBuilder Appilcation that is already running? As it is right now, I have to build a runtime DLL, or use the "PowerBuilder.Application" an...

Own Help in Powerbuilder Help
Hi all How can I get my Own Help into PB12 help? In PB 10.5 I put this into pbhelp105.cnt. But in PB12 there isn't a CNT in the Folder .../help. I found only HxK or HxC in the help folder. I have my own help instruction for Programmer. I want to include this in PB12 too. Have anyone a idea. Thanks. regards, Andr� Rust Actually what you are supposed to do is add this line to the [PB] section of pb.ini: UserHelpFile=myhelpfile.hlp The .cnt file is a type of index file that is generated by the help compiler. Copy your .hlp file into the ...\PowerBuilder...

Powerbuilder & MS Word
Could anybody suggest a good reference book for PB OLE with MS WORD? I've never discovered one. However, all of the MS Word functions are documented in Word itself. From the Word main menu, choose Tools .. Macro .. Visual Basic Editor. Then, from the VB Editor, View .. Object Browser. All of the classes and methods are there, along with the values of constants that you'll need - but all of the examples in the help are, of course, in VB. It is definately possible to translate to PB, but it takes a little experimentation. If you have a specific question about how to do...

URGENT ! POWERBUILDER + WORD + OLE
Hello all, I need to change, from my PowerBuilder application, the print specification of a Word Document before its printing (which paper to use, scale, where to find the paper in the printer, ...) Is it possible with OLE or DDE ? How to do it ? Thanks for all !!! Dany Use INI file settings, i.e. specify 'tray' and 'paper type' to use. Note: It will be hardware dependant pm wrote: > Hello all, > > I need to change, from my PowerBuilder application, the print > specification of a Word Document before its printing (which paper to use, >...

I need help with PowerBuilder 7..
Please, can anyone teach me the basics of this development program. I cant seem to find the perfect book to begin with my PowerBuilder lessons. Thank you and Merry Christmas tristan tristan@uap.edu.ph On 16 Dec 2003 01:19:43 -0800, "Tristan Nuique" <tristan@uap.edu.ph> wrote: >Please, can anyone teach me the basics of this development program. >I cant seem to find the perfect book to begin with my PowerBuilder lessons. >Thank you and Merry Christmas Tristan, The Tutoarial and the User's Guide are a good start http://sybooks.sybase.com/onlin...

PowerBuilder and MS Word Mailmerge
Hello! Since Office 2003 and Office XP I made mail mergue using the MSD of MS Word but with these new versions of office all that code does not work now. Does anyone know how to perform MailMerge with these new word versions? Thank yu in avance Fran first you have to prepare a csv datasource for mail merge operation. to create a datasource take a look at the following snippet: string ls_sql, ls_presentation, ls_syntax, ls_err, ls_datasource_filenm n_tr l_tr n_ds l_ds long li_rc // replace ? of as_sql with value of criteria if as_sql <> "" then as_sql = of...

Word Basic and Powerbuilder. HELP!!!
I have the need to do some Word Basic in Powerbuilder but am having difficulty in finding documentation on how to convert Visual Basic to powerbuilder where MS word 8 is concerned. I created the following macro Sub sig() ' ' sig Macro ' Macro recorded 29/05/99 by peter ' Selection.Find.ClearFormatting With Selection.Find .Text = "signature" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchW...

Powerbuilder 8 and MS Word
Hi everybody, I want to use word in PowerBuilder's application wich open a Word's file and put in some data coming from ASA (for example). For example, the word's file must containing "Dear Client Mister XXX, etc ... and your Contract Number is YYY etc...." where XXX and YYY are extracting from ASA. This file must be opened in Powerbuilder's application and saving after in Database. How is it possible to do this ? Thanks for your help. ALLO. you should be able to start an ole connection to the msword server http://sybooks.sybase.com/onlinebooks...

Powerbuilder and MS Word 2000
Hi all, I am currently experiencing two problems with PowerBuilder 7.0 (Build 6012) and Microsoft word 2000. I am supposed to print a 1 page Word document before the user prints any report. Please see the code that follows this message. This code was working fine with MS Word �97. After installing Word 2000, I have come across two problems. The first one occurs where I open the file and printing that file. ( io_reportdoc.documents.open(ls_filename), io_reportdoc.printout()) It takes way too long to open and printing. I would like to minimize the time. The second problem is th...

PowerBuilder For Japanese Workstations
I need to create deployment kits for 6.5 and 7.0.1 for Japanese workstations. How exactly would I go about this? I know there is a Japanese version of the PB, but where is it? Is it on my CD's or do I need to contact Sybase? Thanks in advance, Chris Contact Sybase Chris Koerner <cekoerne.nospam@yahoo.com> wrote in message news:hg7GlgY6#GA.242@forums.sybase.com... > I need to create deployment kits for 6.5 and 7.0.1 for Japanese > workstations. How exactly would I go about this? I know there is a Japanese > version of the PB, but where is it? Is it on my ...

PowerBuilder 10.2 with Word OLE
Hi, I am having a crazy hard time trying to figure out what is wrong with this PowerBuilder interaction with Microsoft Word 2003. After upgrading from Windows 2000 and Office 2000 to Windows XP and Office 2003, document corruption seems to occur (4 bytes of garbage scattered throughout the document file). Both methods of accessing the OLE/Word DOM are being used. One with the ActiveX control on a form and the other using the CREATE OLEObject. Word is being used to view, edit, print, find and replace text, and render PDF documents; no mail merges or nothing complicated like that. ...

PowerBuilder 5 and Word 2000 with OLE
Hello, I'm trying to insert an OLE control into a window. If I select 'Microsoft Word Document' in the 'Insert Object Window' and try to insert the OLE Object into the window PowerBuilder crashes. I using Powerbulder version 5.0.4 and running Windows NT and Office 2000 Professional Any idea? Hi! Actually, I have the same problem and I've observed that there is no such problem on "fresh" computers - with Windows and Office only. After you install another applications the Word's OLE object stops working properly with PB. I think that ...

Web resources about - Help Needed for - Using Ms Word OLE in Powerbuilder?? - sybase.powerbuilder.general

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 1/15/2016 1:47:28 PM