Using a dotNet dll from Perl to control Word

V

Vic Russell

Hi,

I need to write a dotNet dll which will control Word (open documents, add
templates, set options etc) and which will be invoked from within Perl which
our application is written in. Can anyone give me some pointers? Has anyone
got any relevant examples?

Regards,

Vic Russell
 
S

Sisyphus

Vic Russell said:
Hi,

I need to write a dotNet dll which will control Word (open documents, add
templates, set options etc) and which will be invoked from within Perl which
our application is written in. Can anyone give me some pointers? Has anyone
got any relevant examples?

You could access the functions in the dll using Win32::API. (Win32::API used
to work only with dll's that used stdcall calling convention. I think that
has now changed, but it might be better to use stdcall in your dll if that's
an option.)

You could also use Inline::C to access the functions - though you'll also
need an import lib ('.lib') file for linking purposes if you go down that
path. See 'perldoc Inline::C-Cookbook'. Find the example 'How do I access
Win32 DLL-s using Inline?'.

Cheers,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,489
Latest member
BrigidaD91

Latest Threads

Top