Solved

Start Macro in Word from Delphi

Posted on 2000-04-28
3
637 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 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