Solved

Start Macro in Word from Delphi

Posted on 2000-04-28
3
597 Views
Last Modified: 2010-04-04
Hi,
how can I start a Macro in Word from Delphi?

Micha
0
Comment
Question by:PROGRAMMING030999
3 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 50 total points
ID: 2758884
Here's an example that does some things including running a macro:

var
  Word: OleVariant;
begin
  Word := CreateOleObject('Word.Application');
  Word.WordBasic.FileNew('Normal');
  Word.WordBasic.Insert('This is the first line'#13);
  Word.WordBasic.Insert('This is the second line'#13);
  Word.Run('Macro1');
  Word.WordBasic.FileSaveAs('test.doc');
  Word.WordBasic.FileClose;
end;


Regards,

Epsylon.
0
 
LVL 1

Expert Comment

by:xsoft
ID: 2767591
listening
0
 

Author Comment

by:PROGRAMMING030999
ID: 2768962
Thanks Epsylon for your answer,
I found i nice site about it:

http://www.djpate.freeserve.co.uk/WordPrbs.htm

Cheers Micha


0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now