translating the MS Word type boolean to PowerBuilder type

Hello folks,
Does anyone know how to access a Word type boolean in PB?
The following code is converting the Boolean return type from the Find
function to a Long but always returns zero.

// The following piece of code should look for the string 'LocalMerge' in a
macro contained under MicrosoftWordObjects.

OLEObject lo_MWrd
long  ll_count, ll_status

lo_MWrd = CREATE oleobject
lo_MWrd.ConnectToObject("word.application.8")
lo_MWrd.Visible = TRUE
lo_MWrd.WindowState = 1

lo_MWrd.Documents.Add ("C:\Program
Files\MicrosoftOffice\Templates\normal.dot", FALSE)

ll_count =
lo_MWrd.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLine
s

ll_status =
long(lo_MWrd.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Find(&
     "TLocalMerge", 1, 1, ll_count, ll_count))
lo_MWrd.DisconnectObject()

Thanks if you come up with anything!

Peter




0
Peter
9/1/1999 5:16:29 PM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

1 Replies
485 Views

Similar Articles

[PageSpeed] 27

Type boolean of word, should be type boolean in PB.
(I tried it in excel, and it's a VBA data type, so it should be the same).
If it returns False all the time, so look for something wrong in your code, when
calling the function "Find". I can suggest you to test it first in word visual
basic editor.
Amit

Peter de Souza wrote:

> Hello folks,
> Does anyone know how to access a Word type boolean in PB?
> The following code is converting the Boolean return type from the Find
> function to a Long but always returns zero.
>
> // The following piece of code should look for the string 'LocalMerge' in a
> macro contained under MicrosoftWordObjects.
>
> OLEObject lo_MWrd
> long  ll_count, ll_status
>
> lo_MWrd = CREATE oleobject
> lo_MWrd.ConnectToObject("word.application.8")
> lo_MWrd.Visible = TRUE
> lo_MWrd.WindowState = 1
>
> lo_MWrd.Documents.Add ("C:\Program
> Files\MicrosoftOffice\Templates\normal.dot", FALSE)
>
> ll_count =
> lo_MWrd.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLine
> s
>
> ll_status =
> long(lo_MWrd.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Find(&
>      "TLocalMerge", 1, 1, ll_count, ll_count))
> lo_MWrd.DisconnectObject()
>
> Thanks if you come up with anything!
>
> Peter

0
Amit
9/2/1999 4:18:15 PM
Reply:

Similar Artilces:

ERROR: System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic)
I have searched a lot and almost every person who has reported this error found it while installing the Gallery module and the solution was to remove a section of the .dnn file. However, this is not my case, so, unfortunately, these threads I found have been of little or no help. Please bear with me and offer help if you can, as this is the first time we try using DNN. I am trying to create my own module in DNN 3.2.2 using the dnnJungle VS project templates. I open the DNN source I downloaded from the DNN site that has a total of 35 projects. Compile. Everything OK. I then add...

Could not convert variant of type (UnicodeString) into type (Boolean)
I get "Could not convert variant of type (UnicodeString) into type (Boolean)" in Button1Click when I run this code. Can anyone tell me why this happens? //--------------------------------------------------------------------------- #ifndef Unit3H #define Unit3H //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> //--------------------------------------------------------------------------- class TForm3 : public TForm { __publ...

Unable to cast object of type 'TYPE' to type 'TYPE'.
I've got a custom class and collection...I want to use them to databind a Grid, and persist the state using a Session variable.  However I keep getting the above error **Sometimes...There will be times when it works fine, and times when it totally craps out.System.InvalidCastException: Unable to cast object of type 'ApprovalCycleCollection' to type 'ApprovalCycleCollection'. This should work fine, no?  I want a property to use in all my foreach loops   public ApprovalCycleCollection NewApprovalCycle { get { if (Se...

Bit Data type column from Database to ASP Data grid getting error Cast from type 'DbDataRecord' to type 'Boolean' is not valid.
I have bit Datatype column in my table and I am putting this table into ASP datagrid  I have created a check box in thiscolumn in datagrid using itemtemplate.  so this bit column should have a check box next to it in datagrid but I am getting this when running the app  Cast from type 'DbDataRecord' to type 'Boolean' is not valid. any one know any thing about this issue Hi, khana04: I am not sure about what you are going to do about convert DbDataRecord to Boolean. Would u please show us some code about  it. However, the following code works fine for me to retrive t...

Is code rendering block <%=%> useful for boolean type?Cannot create an object of type 'System.Boolean' from its string representation.
bool function() { return false; } <asp:Button runat=server Enabled=<% = function() % /> but it can't complie, gave an error, Cannot create an object of type 'System.Boolean' from its string representation. Would anybody tell me why? and how to solved it?Joseph Liu The problems I see are with your syntax. You have an equal sign you don't need and missing the #also wrap it in single quotesEnabled='<%# function() %>'Hope it helps,Joehttp://www.joeaudette.comhttp://www.mojoportal.com Wrong! <%# %> is data binding expression. Only works for data-bound control. Wh...

type overwrites other type
Name: Pu Email: padhealedatyahoodotcom Product: Firefox Summary: type overwrites other type Comments: type doesn't fit or overwrites other type see bottom of page. http://www.startupnation.com/homebased100/ Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB6 (.NET CLR 3.5.30729) From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

Enumerated data types/object type on an activeX control
Hello all. I am experimenting with a 3D rendering activeX. The activeX comes with VB and C++ examples. In the VB example I see a declaration like: Dim TubeFace As vdPolyface From the activeX help file I understand that vdPolyface is an object type. When I try doing a powerbuilder declaration like: vdPolyface L_TubeFace I get a message like 'unknown datatype vdPolyface'. I am not new to powerbuilder but have not done a lot of work with OCX/ActiveX controls. Any help would be appreciated. Thanks I don't believe that PB can 'see' the enums. ...

How a WORD Document from SQL Server Image Type is Opened in new Instance of MS-WORD; Technology used
Hi Team,I face some problem in retrieving the word document from SQL Server. FileStream fs = new FileStream(@"C:\My Downloads\BRD Issues.doc", FileMode.Open, FileAccess.Read);BinaryReader r = new BinaryReader(fs);byte[] bytes = new byte[fs.Length];for( long i = 0; i < fs.Length; i++) {bytes = r.ReadByte();}r.Close();fs.Close();someObject.docTemplate = bytes;************** I saved the word document, as byte[] in SQL Server 2000.************ I accessed that byte[] from SQL Server and trying to show in a new instance of MS-Word. byte[] byteArrayObject = new byte[ChunkSize];// I...

Cannot convert type 'type' to 'type'
I am learning all of this, so I am still fresh, so please bear with me :)I have a page that has some txtboxes in it, simple registration form, and I have a button that will save those txt boxes to the db. I am using:- I am using Visual Web Developer 2008 Express Edition- C# When I try to compile the project I get error: Cannot convert type 'System.Web.UI.WebControls' to 'String' This is content of my web.config    <profile> <properties> <add name="FirstName"/> <add name="LasttName"/>...

Type of derived childnodes becomes type of base type after postback
Hi, I'm building a web application with a custom treeview, that has several types of custom treenodes in it. One custom node, which is always a root node in the treeview, is also the base class for the other custom node type. So I have:CustomTreeView           (inherits from TreeView)CustomTreeNodeRoot   (inherits from TreeNode)CustomTreeNodeChild   (inherits from CustomTreeNodeRoot) Everything is working fine except the CustomTreeNodeChild after postback. That's because after postback it's type has changed t...

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

Help with "Could not convert variant of type (OleStr) into type (Boolean)"
Hi everyone, I hope in right place, if im not sorry and show me the rightway =) anyway, I got a big and sick problem here, i have a automation application and it’s work verywell, but sametime the user open a tick with this error "Could not convert variant of type (OleStr) into type (Boolean)". This error occur and another day when we try to simulate step by step the error e problem not occur. So, I want to know where is it came from? How can I simulate it. > {quote:title=Guilherme Salvador wrote:}{quote} > Hi everyone, > > I hope in right place, if im not sorry a...

Conversion from type 'Date' to type 'Boolean' is not valid.
I have a DetailsView and a GridView on my page. When the user clicks "Select" on the GridView, the DetailsView mode gets set to ReadOnly (the Item Template).However, right now when I click "Select" I am receiving the following error Conversion from type 'Date' to type 'Boolean' is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...

Conversion from type 'DBNull' to type 'Boolean' is not valid.
I have two gridviews on a page, when a user clicks a link in the first gridview it populates the second, this all works fine. If there is no record for the second gridview when the link is clicked, I get the following error on the checkbox template column from the second gridview as listed below: How can I prevent this? Conversion from type 'DBNull' to type 'Boolean' is not valid.            <asp:TemplateField HeaderText="Team Captain">          &nb...

Web resources about - translating the MS Word type boolean to PowerBuilder type - sybase.ole-ocx-activex

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: 12/12/2015 10:27:46 AM