Skip to main content

[Migrated content. Thread originally posted on 27 January 2005]

I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.

Here is my syntax.

modify word-doc @Select()
inquire word-app @Selection in word-selection
use word-selection @Font
modify ^Name = "Times Roman"
modify ^Size = 8
end-use

Also, do you know how to take off the select. I tried destroy word-selection and that did not work.

Thanks for you help.
Patty

[Migrated content. Thread originally posted on 27 January 2005]

I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.

Here is my syntax.

modify word-doc @Select()
inquire word-app @Selection in word-selection
use word-selection @Font
modify ^Name = "Times Roman"
modify ^Size = 8
end-use

Also, do you know how to take off the select. I tried destroy word-selection and that did not work.

Thanks for you help.
Patty
Originally posted by Patty Stepp
I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.
Patty


The problem here is the datatype inquired. It is VT-R4, which is better known as single in Visual C world.
ACUCOBOL-GT does not support real datatypes natively, thus there is no automatic handling of this.

However, as of version 6.2.0 you can override the automatic behavior, so this should do (provided you have 6.2.0):

MODIFY wrdSelection @Font::Size = 10 AS VT_R4.

The magic here being the 'AS VT_R4' phrase.

Note that this is a one way conversion, unfortunately, you still cannot obtain a single into a working storage item.

[Migrated content. Thread originally posted on 27 January 2005]

I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.

Here is my syntax.

modify word-doc @Select()
inquire word-app @Selection in word-selection
use word-selection @Font
modify ^Name = "Times Roman"
modify ^Size = 8
end-use

Also, do you know how to take off the select. I tried destroy word-selection and that did not work.

Thanks for you help.
Patty
Is there a copybook or working storage item I am suppose to define ? or DLL I am suppose to call?
Program will not compile with adding the AS VT_R4 syntax.

Undefined data item. AS
Undefined data item. VT_R4.

Thanks for your time.

[Migrated content. Thread originally posted on 27 January 2005]

I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.

Here is my syntax.

modify word-doc @Select()
inquire word-app @Selection in word-selection
use word-selection @Font
modify ^Name = "Times Roman"
modify ^Size = 8
end-use

Also, do you know how to take off the select. I tried destroy word-selection and that did not work.

Thanks for you help.
Patty
Compiling with 6.2 error.

Numeric literal expected VT-R4 found.

[Migrated content. Thread originally posted on 27 January 2005]

I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.

Here is my syntax.

modify word-doc @Select()
inquire word-app @Selection in word-selection
use word-selection @Font
modify ^Name = "Times Roman"
modify ^Size = 8
end-use

Also, do you know how to take off the select. I tried destroy word-selection and that did not work.

Thanks for you help.
Patty
Font Size now works. THANKS.

Any idea how to take the Select() statement off? After I change the font the entire text is selected. I need to take the selection off so when the user goes in, the document is normal. Otherwise, the words are highlighted black. If they hit any key except the mouse, they would wipe out the entire document.

Patty

[Migrated content. Thread originally posted on 27 January 2005]

I am having problems with the syntax of "Type 4" .
Name Type 8.
Size Type 4.

No problem changing the font, but the size does not change.

Here is my syntax.

modify word-doc @Select()
inquire word-app @Selection in word-selection
use word-selection @Font
modify ^Name = "Times Roman"
modify ^Size = 8
end-use

Also, do you know how to take off the select. I tried destroy word-selection and that did not work.

Thanks for you help.
Patty
Here is the syntax that works.

create @Application of @Word handle in word-app.
modify word-app @Visible = 0.
modify word-app @Documents::open(pass-doc,0,0,0," "," ",0," "," ",@wdOpenFormatText)
giving word-doc.
Modify word-doc @PageSetup::TogglePortrait()

*change the pagesetup 15 = .21
USE word-doc @PageSetup
modify ^TopMargin= 15
modify ^LeftMargin = 15
modify ^RightMargin = 15
modify ^BottomMargin = 15
END-USE

*select current document
Modify word-doc @Select()
Inquire word-app @Selection in word-selection.
USE word-selection @Font
modify ^Name = "Courier New"
END-USE
Modify word-selection @Font::Size 9

*take off selection
Modify word-selection @HomeKey(WdLine)