Options

Word Automation: CentimetersToPoints

ta5ta5 Member Posts: 1,164
Hi

I want to use the CentimetersToPoints-Method of the WordApplication-Object:
CREATE(wdApp);
wdApp.Visible := TRUE;
theWidth := wdApp.CentimetersToPoints(7.5);

Unfortunately it doesn't work. The following error is thrown:
Could not invoike the mbmber CentimetersToPoints. The ole control or automation server returned an unknown error.

Navision 3.7, WordLibrary 9.0

Any ideas? Thanks in advance

Thomas

Answers

  • Options
    ta5ta5 Member Posts: 1,164
    Nobody?
    Thanks in advance
  • Options
    WaldoWaldo Member Posts: 3,412
    Did you try to use it in a macro/vba application? If you do that, you can see the code you should be writing.

    But I wouldn't know what I would have to do to get this in VBA :-k .

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Options
    ta5ta5 Member Posts: 1,164
    Hi Waldo
    In VB, it works the expected way, in Navision it doesn't.
    Anyway, I have found a workaround (manual compute the points).

    Thanks
    Thomas
  • Options
    WaldoWaldo Member Posts: 3,412
    Do you mind to share the code and put [Solved] in the topic?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Options
    ta5ta5 Member Posts: 1,164
    Btw:
    The approx formula is as fw:

    theWidth := centimeters * 28.35
Sign In or Register to comment.