Using Ms Word OLE in Powerbuilder??

I'v recently enherited a PowerBuilder app that strips data out of DB2 and
inserts it into A  Word mail/merge document for printing using OLE.  It was
built for use with Word 5.0.  We've gone to Office 97.  It no longer works
(same old story).

Here is the offending code:

ole_document.ActiveDocument.Content.EditGoTo ("Include")
ole_document.ActiveDocument.Content.LINEDOWN(1)
ole_document.ActiveDocument.Content.InsertAfter(i_sAcctDetail)

It stops on the first line and the error message says that the "EditGoTo
property was not found"

Can someone stear me to the reference materials that cover using OLE
property/method features?? Of course if you happen to have the correct
syntax and comannds lying arround that would be good too.

Its a small problem but the fallout is amazing.  I could sure use some help.

You can reach me ad dddinges@carlson.com

TIA

Dan Dinges


0
Daniel
11/11/1998 10:29:44 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

4 Replies
1708 Views

Similar Articles

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

Hi

look at this document from Powersoft:
http://techinfo.sybase.com/css/techinfo.nsf/DocID/ID=44643

Good luck
Roger Doyon

Daniel D. Dinges a �crit dans le message ...
>I'v recently enherited a PowerBuilder app that strips data out of DB2 and
>inserts it into A  Word mail/merge document for printing using OLE.  It was
>built for use with Word 5.0.  We've gone to Office 97.  It no longer works
>(same old story).
>
>Here is the offending code:
>
>ole_document.ActiveDocument.Content.EditGoTo ("Include")
>ole_document.ActiveDocument.Content.LINEDOWN(1)
>ole_document.ActiveDocument.Content.InsertAfter(i_sAcctDetail)
>
>It stops on the first line and the error message says that the "EditGoTo
>property was not found"
>
>Can someone stear me to the reference materials that cover using OLE
>property/method features?? Of course if you happen to have the correct
>syntax and comannds lying arround that would be good too.
>
>Its a small problem but the fallout is amazing.  I could sure use some
help.
>
>You can reach me ad dddinges@carlson.com
>
>TIA
>
>Dan Dinges
>
>

0
Roger
11/11/1998 11:51:34 PM
ActiveDocument.Content.EditGoTo -> ActiveDocument.Selection.GoTo
ActiveDocument.Content.LineDown -> ActiveDocument.Selection.MoveDown
ActiveDocument.Content.InsertAfter -> ActiveDocument.Selection.InsertAfter

Look at Microsoft Word Visual Basic Reference, Visual Basic Reference,
Visual Basic Base Concepts, Word Basic to Visual Basic Convertion in the
Microsoft Word Help.

--
Daniel Santana Mart�n
Dpto. Administraci�n y Sistemas
Binter Canarias, S.A.


0
Daniel
11/12/1998 9:19:57 AM
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
Anonymous
11/7/2000 11:09:39 PM
> Did anybody tried using PB 6.5 and Word 2000? Is it the problem with the
> versions?
I did. And I didn't have any problems with the versions.

> The problem I am facing is Word says
> 'Name not found calling external function goto at line ...'
Your problem is most likely with the wrong parameters you're passing to the
function. The run-time error in the MS Word function could also cause this
message to appear...


--

Regards,

Dmitry Mazhar

> 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.
>
>
> 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
Dmitry
11/8/2000 10:13:16 AM
Reply:

Similar Artilces:

Help Needed for
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...

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...

Powerbuilder 8 and using Word OLE Bookmarks
This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C2FEAF.A88ED4E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm a bit confussed on this as in another application I did it worked = great !!, but in another application (both same Powerbuilder and Word = versions) the code doesn't run ?? Why ?? In one application this works fine:=20 OLE_OBJECT.documents.open("\\Dir\application.doc",0,1) OLE_OBJECT.application.visible=3Dtrue OLE_OBJECT.ActiveDocumentBookmarks.Item("Today"...

Use PowerBuilder DLL in PowerBuilder
We use PB6.5. We would want to use a DLL create from PB in a PB application. We compiled an a PBL as DLL. After we tried to use DLL in a user object external, but without success. How can we do to use DLL create from PB or use in a new PB application some object (visual and no) before compiled with PB? Any help will be appreciated. Saul.Convalle@mail.cec.it Thanks When you create a DLL from a PB library it is not really a standard Windows DLL. I'm not sure what the difference is. If you are making calls from PB then just use the standard PB calling syntax the ...

PowerBuilder to WORD run macro fails using OLE statements
Hello...we are using PB 9.03 to connect to Microsoft WORD 2003 in order to run a VB Macro in WORD. The connection is fine and the database connection is good. We are connecting to WORD using OLE and we are also able to run the macro. We have put various breakpoints in the VB macro using VB's MsgBox function; so we know the macro is running; however when get to a certain line of code in VB macro, a run time error occurs saying: "Requested Object Not Available". The strange thing is we are able to run the VB macro inside WORD by itself and it works perfectly as a stand alo...

Passing string arguments to MS Word using PowerBuilder 11.2
Hello, We are trying to pass data from a datawindow to MS Word using multiple arguments. This is the current syntax that Powerbuilder does not like: We are using a MS Word macro to perform this...if we remove the string fields, PowerBuilder compiles fine. businessunit.Run("PopulateContacts", ls_lead1,ls_fname, ls_lname, ls_addprimary, ls_cityprimary, ls_stateprimary, ls_zipprimary, ls_empphone, ls_cell, ls_emergencycontact, ls_addemergency, ls_cityemergency, ls_stateemergency, ls_zipemergency, ls_phonemergency, ls_cellemergency, ls_relationprimary Any thoughts... ...

(New Thread) PowerBuilder to WORD run macro fails using OLE
This is a multi-part message in MIME format. ---=_forums-1-dub46080c7a Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Mitch, I have added an attachment with the code of the WORD macro above and listed the relevant part here below: In the attachment above, the line of code where macro stops execution when run from PB is shown in bold. Also, on the partial macro below, it terminates at line: "ThisDocument.MailMerge.DataSource.ActiveRecord = wdLastRecord" --Start ActiveDocument.MailMerge.OpenDataSource Name:=strName, _ ...

PowerBuilder, connecting to MS SQL Server using MSS native driver: A field which is defined as a varchar (450) is truncated to 255 characters in PowerBuilder
PowerBuilder, connecting to MS SQL Server using MSS native driver: A field which is defined as a varchar (450) is truncated to 255 characters in PowerBuilder I am using Power Builder 7.0 with SQL Server 2000 Database. I created a datawindow using a varchar(450) field. It is allowing me enter and save 450 characters but when I retrieved the data it is truncating it to 255 chars. I looked in the database all 450 characters are there. Why it is truncating the data on retrieve? Please help me out if anybody knows the solution Thanks in advance because the native interface (Micr...

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...

connecting PowerBuilder 10 to MS-SQL Server using OLE DB: Problems with trailing blanks in StringType Data
HI. We work on a project using PowerBuilder 9.0.1 connected to a MS-SQL Server DataBase. Now we want to upgrade to PB 10, and we've realized that we have to use OLE DB to connect to our DataBase. OK, we've made the connection via OLE DB, now we are starting to have some unexpected troubles.. For instance: In datawindows retrieving String Type data, the OLE DB connection give us all the string data without trimming the trailing blank spaces...With PowerBuilder 9 (and its native MSSQL Server interface), the String data would come all trimmed down...i.e.: "HELLO"...

connecting PowerBuilder 10 to MS-SQL Server using OLE DB: Problems with trailing blanks in StringType Data
HI. We work on a project using PowerBuilder 9.0.1 connected to a MS-SQL Server DataBase. Now we want to upgrade to PB 10, and we've realized that we have to use OLE DB to connect to our DataBase. OK, we've made the connection via OLE DB, now we are starting to have some unexpected troubles.. For instance: In datawindows retrieving String Type data, the OLE DB connection give us all the string data without trimming the trailing blank spaces...With PowerBuilder 9 (and its native MSSQL Server interface), the String data would come all trimmed down...i.e.: "HELLO"...

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...

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...

Using ole from powerbuilder
I would like to ask if there is a command to compute the sum of two columns in a third one, in Excel. I want to use this command from Powerbuilder. (I already use Ole object) sum() ? ...

Web resources about - 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: 2/10/2016 8:04:45 AM