xsharp.eu • NamedArguments with VO Dialect
Page 1 of 1

NamedArguments with VO Dialect

Posted: Tue Aug 24, 2021 1:44 pm
by pemo18
Hello,

Are their any plans to provide named arguments for the VO dialect too?

I know there would be some kind of conflicts between different kinds of method call syntax.

It would be very convinient for Office Interop method calls.

Kind regards,
Peter

PS: There should be at least one example for named arguments in the X# help file.

NamedArguments with VO Dialect

Posted: Tue Aug 24, 2021 1:53 pm
by robert
Peter,
Are you using strongly typed Office classes or OleAutoObject?
With the strongly typed classes you should be able to
( if you enable the 'Allow Named Arguments' option in the compiler options:)

Code: Select all

// when oDocument is a Word Document
oDocument:SaveAs2(FileName := "SomeFileName.Docx", EmbedTrueTypeFonts := TRUE)

Robert

NamedArguments with VO Dialect

Posted: Tue Aug 24, 2021 2:03 pm
by pemo18
Hi Robert,

Only a few seconds after I hit submit I found the compiler settings.

This is very good, thank you for that small improvement.

But there is no mentioning in the readme.rtf?

Regards,
Peter