Need help with CLR and DocX.dll

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Need help with CLR and DocX.dll

18 Jun 2018, 13:31

Hi all, I've been trying to get DocX.dll, which is now actually Xceed.Words.NET.dll (a library for working with docx Office documents) working with CLR.
The following code works fine in LinqPad:

Code: Select all

<Query Kind="VBStatements">
  <Reference Relative="System.Drawing.dll">C:\DocX Dll\System.Drawing.dll</Reference>
  <Reference Relative="System.Runtime.dll">C:\DocX Dll\System.Runtime.dll</Reference>
  <Reference><RuntimeDirectory>\System.Windows.Forms.dll</Reference>
  <Reference Relative="System.XML.dll">C:\DocX Dll\System.XML.dll</Reference>
  <Reference Relative="System.Xml.Linq.dll">C:\DocX Dll\System.Xml.Linq.dll</Reference>
  <Reference Relative="Xceed.Words.NET.dll">C:\DocX Dll\Xceed.Words.NET.dll</Reference>
</Query>

Dim myDoc As Object
            mydoc = Xceed.Words.NET.DocX.Create(Directory.GetCurrentDirectory & "\Help2.docx")
            Dim p As Object = mydoc.InsertParagraph()
            p.Append("Hello World")
            mydoc.Save()
But this AHK script won't compile:
Spoiler
It throws this error:
---------------------------
Compilation Failed
---------------------------
Error BC30390 on line 12: 'Xceed.Words.NET.DocXElement.Friend Property Document As Xceed.Words.NET.DocX' is not accessible in this context because it is 'Friend'.
Can someone point me in the right direction? Thanks a million.
Regards,
burque505

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 180 guests