Highlighted
Absent Member.
Absent Member.
337 views

[archive] Winword an named parameters

[Migrated content. Thread originally posted on 24 November 2004]

Me again,

i try to open a *.txt dokument with winword

my normal call is:
modify word-Handle, Documents::Open2000(my-document)
giving document-handle

which works as wanted.

But:
some kind of documents need to be forced into western encoding(msoEncodingWestern).

i tied it with these lines (and many others):
modify word-Handle, Documents::Open2000
(my-document, , , , , , , , , ,1252, ,)
1252 is the value of msoEncodingWestern.
But it doesn?t work.
the document opens, but in wrong encoding (a strange asian encoding)


in vba i would write
documents.open Filename:=my_document,Encoding:=msoEncodingWestern
and it works.

But i can?t get named parameters in acu to work.

is it posible and i am too stupid, or is it a veryveryverymissing Feature?

or is there another way to force western encoding?

(i already tried to set the "defaulttextencoding" and many, many other things)

EDIT:
ups .. i posted this in general .. maybe some admin can move this post to Graphical Programming / ActiveX ... sorry
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Winword an named parameters

Using named parameters with ACUCOBOL-GT is quite simple really.

This vb code:

documents.open Filename:=my_document,Encoding:=msoEncodingWestern
[\CODE]
translates in ACUCOBOL-GT to:

MODIFY oDocuments Open(
BY NAME Filename my_document,
BY NAME Encoding msoEncodingWestern).
[\CODE]
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Winword an named parameters

Just tried it .. wow .. it works perfect.

Many thanks to you. this was the last big problem on my way to replace my *.vbs files.

(i?m new to this forum, but i already love it)
😄
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Winword an named parameters

Originally posted by SliverHH
Just tried it .. wow .. it works perfect.
(i?m new to this forum, but i already love it)
😄


Welcome aboard!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.