Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Start Macro in Word from Delphi

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

Micha
0
Comment
Question by:PROGRAMMING030999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 100 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

618 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