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.
0
Joy
5/25/2003 3:40:21 PM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

1 Replies
876 Views

Similar Articles

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

Dear "Joy"!


There is some way to hide all the commandbars in word ( when ole-control 
is  displayed as "displayasactivexdocument!"

Just set some visible properties for the word-ole-control:
e.g. this sets all the commandbars in the ole-control invisible

long ll_count, ll_max

ll_max = ole_1.object.application.activedocument.commandbars.count
ole_
1.object.application.activedocument.commandbars.activemenubar.visible=fal
se
for ll_count = 1 to ll_max
	ole_1.object.application.activedocument.commandbars.item
(ll_count).visible=false
next

this code is not well tested, so don't expect wonders, but it does it's 
thing good for me on the first sight!

For other Word-specific things look the VBA-help or MSDN! (Scrollbars 
can!!! also be hidden, but my code doesn't)

Best Regards


Andreas Wurzer
ccServices, Vienna


Joy wrote in
news:6ADC7C3EE2EAF9690056179585256D31.005617D285256D31@webforums: 

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

0
Andreas
5/26/2003 11:47:45 AM
Reply:

Similar Artilces:

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

PB/MS Word OLE resource
Hi All Can anyone point me to a solid PB 8/MS Word OLE guide? covering things like Header/footer manipulation, mail-merge functionality, etc.? TIA P. << Can anyone point me to a solid PB 8/MS Word OLE guide? covering things like Header/footer manipulation, mail-merge functionality, etc.?>> I can only offer you my experience. I do very advanced Word manipulation programatically, including all of the above and much more. Word mail-merges are a real mess and need much code to make them work properly if you have: 1) Mail Merge Fields in Headers/...

PB OLE MS-Word Insert/Invoegen
Hi, I have to put information from a dw to bookmarks in a MS-Worddoc. For english MS-Word I used ole_obj.FileOpen(), ole_obj.EditGoto() and ole_obj.Insert(). Now customer has dutch MS-Word. I changed to ole_obj.BestandOpenen(), ole_obj.BewerkenGaNaar and ole_obj.Invoegen(). All works fine, except ole_obj.Invoegen(). Remark : FileOpen and EditGoto are macros, Insert is a statement. Does this seem like a bug, does someone knows the answer? Helga ...

Ole connectivity commands from PB to MS-Word.
Hi everybody, I am trying to send PB-Reports to MS-Word within ole automation. What's the command for opening a document from Pb when using the MS-Word? Can anybody recommend any book or send pieces of code showing the command he use? Regards Marius Conceptware Consult GmbH Marius, Goto http://www.ctpartners.com/asp/tips.asp, register (free) and do a search in the download section for "OLE" - there is a great document there with numerous commands. Roy On Tue, 08 Sep 1998 04:59:53 -0400, in powersoft.public.powerbuilder.ole-ocx-activex Mar...

Jaguar PB Object with OLE to MS Word/Excel
Hello people ! can anybody help me how to set the user under which an oleObject like "Word.Application" is created within a PB Jaguar Component ? I am using Jaguar 3.6.1 and Office 2000 It is necessary for me to use a specific user because most of the settings in office 2000 are user specific (like defaultfilepath) this is a part of the source Code: OLEOBJECT lole_word long ll_ret string ls_parm, ls_servername, ls_username, ls_password, ls_dir lole_word = Create OLEOBJECT ll_ret = lole_word.ConnectToNewObject("Excel.Application") if ll_ret < ...

PB 10 (6064) OLE MS-Word Object
I added an OLE Word Document Object to a tab page. Here is the script I use in PB: li_result = parent.ole_letter.InsertClass ("Word.Document") li_result = parent.ole_letter.LinkTo (ls_file) li_result = parent.ole_letter.Activate (offsite!) The document opens fine but: 1. How can I get the document to opened maximized? 2. The history of most recent files opened is getting wiped out? 3. PB crashes when trying to open the tab object that contains the OLE. After I export and import the tab object the problem seems to go away. Then after adding an OLE to another object ...

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

PB 9.0.1 App Error R0039 during OLE MS WORD CheckSpelling()
I've successfully added MS Word spellchecking to my application. It works exactly as we need it to... .... except with the following problem! When a user starts spellchecking (in that, I mean MS Word's spell check dialog box is open) and the user leaves the application, after about 20 minutes, the app spits out the following error msg: Error Number 39 Error Text = Error accessing external object property checkspelling at line 32 in function blah() of object n_blah. However, if the user mimics the identical process, but does not stop until the spell check is over, it ...

can i use pb's automation server to create an activex/ole/ocx? help me!
Please do not cross-post. -- <hopethishelps/> Roy Kiesler [TeamSybase] MySybase -- http://www.sybase.com/mysybase "tadsun" <tadsun@163.com> wrote in message news:UXo0Ru7BCHA.201@forums.sybase.com... > > > ...

PB to create OLE and OLE with PD
It works great to reuse NVO's from Powerbuilder within PD. Excellent! D. Baer Sybase CH Works great to create instances of Jaguar COM proxies too! <!--SCRIPT comp = CreateObject("SVU.SVULogin"); comp.Username="jagadmin"; comp.Password=""; comp.Host="localhost:9000"; comp.Initialize(); if(comp.isLogin("123-45-6789") { document.writeln("Login successful"); } --> Dave Wolf Jaguar Product Team Dominik Baer wrote: > It works great to reuse NVO's from Powerbuilder within PD. > Ex...

PB
Hello: I would like to open word, excel files within a powerbuilder application in read-only mode. And I do not want the menu and toolbar of the word, excel application to be displayed. Is there a way to hide the menu and toolbar? Any help will be greatly appreciated. Thanks Mathi Hi Check for the "DsoFramer" control. (Microsoft Developer Support Office Framer Control 1.2 Sample (MSDN - KB311765)) Alexei "MAthi" <smathioli@yahoo.com> �������/�������� � �������� ���������: news:4448f089$1@forums-2-dub... > > Hello: > ...

PB and Word OLE
FWIW - Here is some OLE automation stuff for Word 97. I will be updating this shortly, but another member had asked about this as well. ** Apply Microsoft Word SR-1 for Office 97 ** Seems to speed up OLE. Word 97 OLE Automation with PowerBuilder 5.x + There are several examples of Word OLE with Word 95, but few for Word 97. Word 97 uses VB for Applications(VBA) as it's scripting language and therefore makes the previous examples "legacy." Describe below are some common OLE method you may want to call to communicate with Word 97. The best resources for more i...

PB to Word, OLE
I connect to Word 97 with PB7. That works fine. Now I want to save the word document and send the filename from word to PB. How have I access to my current PowerBuilder application? How can I call a function from PB in Word? I tried it in Word with GetObject fo getting my Powerbuilder Application, but this didn't work.... Thanks. ...

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

Web resources about - OLE, MS Word, PB - sybase.ole-ocx-activex

Word Aligned
A collection of articles on software development written by Thomas Guest.

Chinese word for "crisis" - Wikipedia, the free encyclopedia
The Chinese word for "crisis" ( simplified Chinese : 危机 ; traditional Chinese : 危機 ; pinyin : wēijī ; Wade–Giles : wei-chi ) is frequently invoked ...

Throne Speech 2015: Rona Ambrose, Thomas Mulcair Highlight Words Left Unsaid 0
The leaders were quick to point out what Liberals left out of their throne speech. There were about 1,600 words in the new Liberal government's ...

Use These Words, Not Those Words
As lawyers, whether we’re transactional lawyers or litigators, we certainly know the importance of words.

#BuzzLine Contest: Wrap up the Holidays in Six Words
... is everyone? Maybe it’s not always that hectic, but finding time to shop can be a challenge. If you could make a prediction, what six-word ...

​Anxious loved ones await word after San Bernardino shooting
Text messages help reassure some as others wait hours to find out whether family and friends survived shooting at Inland Regional Center

Washington's post-shooting ritual: angry words and political polarization
CNN Washington's post-shooting ritual: angry words and political polarization CNN Washington (CNN) America's political polarization is so ...

Atheist Democrat Quits Town Council Over Words ‘Christmas Tree,’ Then Retracts Resignation
Atheist Democrat Quits Town Council Over Words ‘Christmas Tree,’ Then Retracts Resignation

Twitter trademark filling lays claim to the word 'subtweet'
... popular that Twitter wants to trademark the term. In a recent application, the 140-character social network filed for a trademark on the word ...

A Few Words About 'Prayer-Shaming'
If it helps break the stranglehold of the religious right—and the various charlatans and fools that cater to them—on our politics, it will be ...

Resources last updated: 12/7/2015 4:24:43 AM