Ole Word and Powerbuilder

N

Natasha

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.Selection.Paragraph.TabIndent = 1 - for tabbing
2)
iole_object.Selection.Paragraphs.LeftIndent = 1 or
iole_object.Selection.Paragraphs.LeftIndent - for indent
3) I need to create a bookmark, insert a word and hightlight it.
Nothing works for Powerbuilder.

I'll appreciate very much for help. Thank you in advance.
 
C

Cindy M -WordMVP-

Hi Natasha,

I have no experience with PowerBuilder, but I may be able to get things
rolling. If you press Alt+F11 in Word to open the VBA-Editor, you'll be
able to get information on Word's object model (the Object Browser and
the Help files). Press Ctrl+G and you'll open the Immediate Window,
which I use a lot to test single lines of code, and find out the exact
syntax I need to get to an object or property.

Start typing Selection. and when you've typed . Intellisense should
trigger and give you a list of valid things that can follow Selection.
Font is one of these, Paragraph is not. That's because a font can be
applied to a selection, but paragraph formatting, "by definition",
cannot.

Now try Selection.Range. and you ought to be able to choose
ParagraphFormat. And then you should be able to .LeftIndent.

Note: for future questions about working with Word's object model,
you'll have more luck getting a prompt response in one of the Word.vba
groups, probably .general for this type of question. It's also a good
idea to mention the version of Word involved whenever you ask a
question.
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.Selection.Paragraph.TabIndent = 1 - for tabbing
2)
iole_object.Selection.Paragraphs.LeftIndent = 1 or
iole_object.Selection.Paragraphs.LeftIndent - for indent
3) I need to create a bookmark, insert a word and hightlight it.
Nothing works for Powerbuilder.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top