Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating a Word Document using VBA

Former Member
0 Likes
868

Hello out there!

A client wants me to write a programm that calls (and opens) a standard Word-Dokument and then adds some Data to it (Address Customer,...).

I´ve been searching this Forum... And they´re are some usefull links to be found... Most of the time however, they are dealing with Excel, not Word...

Does anybody have some example code for me?

Open Word Dokument, Modify it, than save it (Manually)

Thanx a lot you guys!

Greetz from a football crazed Germany!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
689

Refer these links:

Regards,

Ravi

5 REPLIES 5
Read only

Former Member
0 Likes
690

Refer these links:

Regards,

Ravi

Read only

Former Member
0 Likes
689

See the sap program interface (se24) <b>I_OI_CONTAINER_CONTROL</b> in which you can use <b>GET_DOCUMENT_PROXY</b> method.

Rgds,

TM.

Read only

Former Member
0 Likes
689

Hi Pieter,

Please give me your email id. I have a very good document on the same. I will send the same to you.

Also, refer the following link as a guideline.

http://www.esnips.com/doc/741a848e-f49a-4436-bec4-e21950f6c94c/desktop-office-integration.pdf

http://www.esnips.com/doc/2080a9ec-64f9-49c4-bd03-d9f56bc2437c/MSWord--Excel-with-ABAP.pdf

<b>Reward points if it helps.</b>

Regards,

Amit Mishra

Read only

0 Likes
689

Thank you all for replying...

Unfortunately I had already seached the SDN-Forum, so most of the links are quite familiar...

But keep the answers coming!!!

Thanx again!

Read only

Former Member
0 Likes
689

Hi Try this,

May I know which version u r using, if <4.7EE, u can use the following FM:

CALL FUNCTION 'GUI_RUN'

EXPORTING

COMMAND = 'WINWORD'

  • PARAMETER =

  • CD =

IMPORTING

RETURNCODE = I_RETURNCODE.

WRITE : / I_RETURNCODE.

Sreedhar