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.

Modify OLE reference on a datawindow

5 posts in DataWindow Last posting was on 2007-03-07 19:54:14Z
Jeremiah Sulewski Posted on 2007-03-06 21:47:31Z
Sender: 5265.45eddd9c.1804289383@sybase.com
From: Jeremiah Sulewski
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Modify OLE reference on a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45ede173.530c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Mar 2007 13:47:31 -0800
X-Trace: forums-1-dub 1173217651 10.22.241.41 (6 Mar 2007 13:47:31 -0800)
X-Original-Trace: 6 Mar 2007 13:47:31 -0800, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:82811
Article PK: 407436

I have an OLE control on a datawindow. My main window
allows the user to select a word document. How do I then
change the OLE control to the new document selected by the
user? i've played w/ LinkTo and InsertFile and get an error
accessing external object property message. my code was:

dw_1.object.ole_1.insertfile(is_file_name)

any suggestions?


Mitch Posted on 2007-03-07 13:13:14Z
Sender: 34fb.45e8149b.1804289383@sybase.com
From: Mitch
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify OLE reference on a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45eeba6a.6de5.1681692777@sybase.com>
References: <45ede173.530c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Mar 2007 05:13:14 -0800
X-Trace: forums-1-dub 1173273194 10.22.241.41 (7 Mar 2007 05:13:14 -0800)
X-Original-Trace: 7 Mar 2007 05:13:14 -0800, 10.22.241.41
Lines: 19
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:82818
Article PK: 407441

If they simply need to view the document you can use a web
browser control and ...

dw.object.ole_1.object.Navigate(is_file_name)

If they need to edit, how about embedding all needed ole
objects and displaying only the selected doc type?

> I have an OLE control on a datawindow. My main window
> allows the user to select a word document. How do I then
> change the OLE control to the new document selected by the
> user? i've played w/ LinkTo and InsertFile and get an
> error accessing external object property message. my code
> was:
>
> dw_1.object.ole_1.insertfile(is_file_name)
>
> any suggestions?


Jeremaih Sulewski Posted on 2007-03-07 14:30:06Z
Sender: 5837.45ee0035.1804289383@sybase.com
From: Jeremaih Sulewski
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify OLE reference on a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45eecc6e.70b0.1681692777@sybase.com>
References: <45eeba6a.6de5.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Mar 2007 06:30:06 -0800
X-Trace: forums-1-dub 1173277806 10.22.241.41 (7 Mar 2007 06:30:06 -0800)
X-Original-Trace: 7 Mar 2007 06:30:06 -0800, 10.22.241.41
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:82822
Article PK: 407445

>First - thanks for the response. What i am trying to
accomplish is to pull a set of employees from the database
and print their name/address information at the top of a
letter. Then the user be able to pull from any number of
word documents to compose the body of the letter (would
print one page per employee). there is not a set group of
documents and i wanted this to be able to handle any newly
created body of text as needed. and i was combining it w/
database info at the top of whatever document it might be.
Thanks.

If they simply need to view the document you can use a web

> browser control and ...
>
> dw.object.ole_1.object.Navigate(is_file_name)
>
> If they need to edit, how about embedding all needed ole
> objects and displaying only the selected doc type?
>
>
> > I have an OLE control on a datawindow. My main window
> > allows the user to select a word document. How do I
> > then change the OLE control to the new document selected
> > by the user? i've played w/ LinkTo and InsertFile and
> > get an error accessing external object property message.
> > my code was:
> >
> > dw_1.object.ole_1.insertfile(is_file_name)
> >
> > any suggestions?


Mitch Posted on 2007-03-07 18:47:12Z
Sender: 34fb.45e8149b.1804289383@sybase.com
From: Mitch
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify OLE reference on a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45ef08b0.7abb.1681692777@sybase.com>
References: <45eecc6e.70b0.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Mar 2007 10:47:12 -0800
X-Trace: forums-1-dub 1173293232 10.22.241.41 (7 Mar 2007 10:47:12 -0800)
X-Original-Trace: 7 Mar 2007 10:47:12 -0800, 10.22.241.41
Lines: 44
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:82829
Article PK: 407452

If they're all Word documents, look at Word's MailMerge
object. You set up a Word Mail Merge doc with
EmpName,EmpAddressLine,EmpCityStateZip merge fields. You do
dw.SaveAs() to populate your mergefile.

1. Open up your EmployeLetterMergeFile.doc
2. Insert the user's selected Word doc.
3. Perfom the Mail Merge operation - need to set the
datasource, etc.
4. Print the letters.

http://msdn2.microsoft.com/en-us/library/aa223026(office.11).aspx

> >First - thanks for the response. What i am trying to
> accomplish is to pull a set of employees from the database
> and print their name/address information at the top of a
> letter. Then the user be able to pull from any number of
> word documents to compose the body of the letter (would
> print one page per employee). there is not a set group
> of documents and i wanted this to be able to handle any
> newly created body of text as needed. and i was combining
> it w/ database info at the top of whatever document it
> might be. Thanks.
>
> If they simply need to view the document you can use a web
> > browser control and ...
> >
> > dw.object.ole_1.object.Navigate(is_file_name)
> >
> > If they need to edit, how about embedding all needed ole
> > objects and displaying only the selected doc type?
> >
> >
> > > I have an OLE control on a datawindow. My main window
> > > allows the user to select a word document. How do I
> > > then change the OLE control to the new document
> > > selected by the user? i've played w/ LinkTo and
> > > InsertFile and get an error accessing external object
> > > property message. my code was:
> > >
> > > dw_1.object.ole_1.insertfile(is_file_name)
> > >
> > > any suggestions?


Jeremiah Sulewski Posted on 2007-03-07 19:54:14Z
Sender: 7c1d.45ef17ab.1804289383@sybase.com
From: Jeremiah Sulewski
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Modify OLE reference on a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45ef1866.7c36.1681692777@sybase.com>
References: <45ef08b0.7abb.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Mar 2007 11:54:14 -0800
X-Trace: forums-1-dub 1173297254 10.22.241.41 (7 Mar 2007 11:54:14 -0800)
X-Original-Trace: 7 Mar 2007 11:54:14 -0800, 10.22.241.41
Lines: 54
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:82830
Article PK: 407454

that might be the solution i need to go with. i was trying
to avoid two things 1) the user having to remember to put
the merge fields on their word documents 2) if i wanted to
change what the database was retreiving and printing at the
top of the dw i could do so without having to update all
word documents merge fields to match

but thanks for the response!

> If they're all Word documents, look at Word's MailMerge
> object. You set up a Word Mail Merge doc with
> EmpName,EmpAddressLine,EmpCityStateZip merge fields. You
> do dw.SaveAs() to populate your mergefile.
>
> 1. Open up your EmployeLetterMergeFile.doc
> 2. Insert the user's selected Word doc.
> 3. Perfom the Mail Merge operation - need to set the
> datasource, etc.
> 4. Print the letters.
>
>
http://msdn2.microsoft.com/en-us/library/aa223026(office.11).aspx
>
>
> > >First - thanks for the response. What i am trying to
> > accomplish is to pull a set of employees from the
> > database and print their name/address information at the
> > top of a letter. Then the user be able to pull from any
> > number of word documents to compose the body of the
> > letter (would print one page per employee). there is
> > not a set group of documents and i wanted this to be
> > able to handle any newly created body of text as needed.
> > and i was combining it w/ database info at the top of
> > whatever document it might be. Thanks.
> >
> > If they simply need to view the document you can use a
> > > web browser control and ...
> > >
> > > dw.object.ole_1.object.Navigate(is_file_name)
> > >
> > > If they need to edit, how about embedding all needed
> > > ole objects and displaying only the selected doc type?
> > >
> > >
> > > > I have an OLE control on a datawindow. My main
> > > > window allows the user to select a word document.
> > > > How do I then change the OLE control to the new
> > > > document selected by the user? i've played w/ LinkTo
> > > > and InsertFile and get an error accessing external
> > > > object property message. my code was:
> > > >
> > > > dw_1.object.ole_1.insertfile(is_file_name)
> > > >
> > > > any suggestions?