Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Insert function in OLEobject

3 posts in Objects Last posting was on 2008-02-11 05:54:17.0Z
Sonu Jain Posted on 2008-01-24 08:56:35.0Z
From: "Sonu Jain" <sonuj@wwil.net>
Newsgroups: sybase.public.powerbuilder.objects
Organization: 118.91.176.130
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Insert function in OLEobject
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <479852c3@forums-1-dub>
Date: 24 Jan 2008 00:56:35 -0800
X-Trace: forums-1-dub 1201164995 10.22.241.152 (24 Jan 2008 00:56:35 -0800)
X-Original-Trace: 24 Jan 2008 00:56:35 -0800, vip152.sybase.com
Lines: 41
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9599
Article PK: 736743

hi all,
Can anybody tell me if in Powerbuilder 6 we can use insert function with
oleobject.
i have code, error occured OLEMailMerge.insert( lAddress ) line. not any
comiplation error is occured but at run time error is occured.
plz Help me and thanks in advance

Any lResult
Long lTotRows,i,j,ret
String lAddress
// Declare and create ole object.
OLEObject OLEMailMerge
OLEMailMerge = CREATE OLEObject
lResult = OLEMailMerge.ConnectToNewObject( "word.basic" )
If Integer(lResult) <> 0 Then
DESTROY OLEMailMerge
MessageBox( "Error in connecting to Word for Windows", "Error Code: " +
String( lResult ) )
Return
End If
lTotRows = dw_1.Rowcount()
For i = 1 to lTotRows Step 1
lAddress = dw_1.GetItemString(i,1)
ClipBoard( lAddress )
lResult = OLEMailMerge.FileOpen("C:\doc\ole_letter.doc")
If Integer(lResult) <> 0 Then
DESTROY OLEMailMerge
MessageBox("Error in connecting to Word " + &
"for Windows", "Error Code: " + String( lResult ) )
Return
End If
// These are the important commands:
OLEMailMerge.editgoto( "Address" )
OLEMailMerge.insert( lAddress )
OLEMailMerge.FilePrint()
OLEMailMerge.FileClose( 2 )
Next
lResult = OLEMailMerge.DisConnectObject()
DESTROY OLEMailMerge
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Roland Smith [TeamSybase] Posted on 2008-01-28 12:40:31.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.objects
References: <479852c3@forums-1-dub>
Subject: Re: Insert function in OLEobject
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <479dcd3f$1@forums-1-dub>
Date: 28 Jan 2008 04:40:31 -0800
X-Trace: forums-1-dub 1201524031 10.22.241.152 (28 Jan 2008 04:40:31 -0800)
X-Original-Trace: 28 Jan 2008 04:40:31 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9600
Article PK: 736742

What version of Word are you using? What OS?

"Sonu Jain" <sonuj@wwil.net> wrote in message news:479852c3@forums-1-dub...
> hi all,
> Can anybody tell me if in Powerbuilder 6 we can use insert function with
> oleobject.
> i have code, error occured OLEMailMerge.insert( lAddress ) line. not any
> comiplation error is occured but at run time error is occured.
> plz Help me and thanks in advance
>
> Any lResult
> Long lTotRows,i,j,ret
> String lAddress
> // Declare and create ole object.
> OLEObject OLEMailMerge
> OLEMailMerge = CREATE OLEObject
> lResult = OLEMailMerge.ConnectToNewObject( "word.basic" )
> If Integer(lResult) <> 0 Then
> DESTROY OLEMailMerge
> MessageBox( "Error in connecting to Word for Windows", "Error Code: " +
> String( lResult ) )
> Return
> End If
> lTotRows = dw_1.Rowcount()
> For i = 1 to lTotRows Step 1
> lAddress = dw_1.GetItemString(i,1)
> ClipBoard( lAddress )
> lResult = OLEMailMerge.FileOpen("C:\doc\ole_letter.doc")
> If Integer(lResult) <> 0 Then
> DESTROY OLEMailMerge
> MessageBox("Error in connecting to Word " + &
> "for Windows", "Error Code: " + String( lResult ) )
> Return
> End If
> // These are the important commands:
> OLEMailMerge.editgoto( "Address" )
> OLEMailMerge.insert( lAddress )
> OLEMailMerge.FilePrint()
> OLEMailMerge.FileClose( 2 )
> Next
> lResult = OLEMailMerge.DisConnectObject()
> DESTROY OLEMailMerge
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Sonu Jain Posted on 2008-02-11 05:54:17.0Z
From: "Sonu Jain" <sonuj@wwil.net>
Newsgroups: sybase.public.powerbuilder.objects
Organization: 118.91.176.130
References: <479852c3@forums-1-dub> <479dcd3f$1@forums-1-dub>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: Insert function in OLEobject
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47afe309$1@forums-1-dub>
Date: 10 Feb 2008 21:54:17 -0800
X-Trace: forums-1-dub 1202709257 10.22.241.152 (10 Feb 2008 21:54:17 -0800)
X-Original-Trace: 10 Feb 2008 21:54:17 -0800, vip152.sybase.com
Lines: 51
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9604
Article PK: 736745

Word 2007 and Windows XP is OS

On 28 Jan 2008 04:40:31 -0800,
in sybase.public.powerbuilder.objects

Roland Smith [TeamSybase] <rsmith_at_trusthss_dot_com> wrote:
>What version of Word are you using? What OS?
>
>"Sonu Jain" <sonuj@wwil.net> wrote in message news:479852c3@forums-1-dub...
>> hi all,
>> Can anybody tell me if in Powerbuilder 6 we can use insert function with
>> oleobject.
>> i have code, error occured OLEMailMerge.insert( lAddress ) line. not any
>> comiplation error is occured but at run time error is occured.
>> plz Help me and thanks in advance
>>
>> Any lResult
>> Long lTotRows,i,j,ret
>> String lAddress
>> // Declare and create ole object.
>> OLEObject OLEMailMerge
>> OLEMailMerge = CREATE OLEObject
>> lResult = OLEMailMerge.ConnectToNewObject( "word.basic" )
>> If Integer(lResult) <> 0 Then
>> DESTROY OLEMailMerge
>> MessageBox( "Error in connecting to Word for Windows", "Error Code: " +
>> String( lResult ) )
>> Return
>> End If
>> lTotRows = dw_1.Rowcount()
>> For i = 1 to lTotRows Step 1
>> lAddress = dw_1.GetItemString(i,1)
>> ClipBoard( lAddress )
>> lResult = OLEMailMerge.FileOpen("C:\doc\ole_letter.doc")
>> If Integer(lResult) <> 0 Then
>> DESTROY OLEMailMerge
>> MessageBox("Error in connecting to Word " + &
>> "for Windows", "Error Code: " + String( lResult ) )
>> Return
>> End If
>> // These are the important commands:
>> OLEMailMerge.editgoto( "Address" )
>> OLEMailMerge.insert( lAddress )
>> OLEMailMerge.FilePrint()
>> OLEMailMerge.FileClose( 2 )
>> Next
>> lResult = OLEMailMerge.DisConnectObject()
>> DESTROY OLEMailMerge
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>