Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Running a Word macro from Excel problem


I am trying to run a Word macro from Excel. The Macro, called
DocumentSave1 is saved in the ThisDocument folder of the WrapUpTemplate
file (see code). The relevant part of the code is:

Dim wdApp as Word.Application

Set wdApp = CreateObject("word.application")

wdApp.Documents _
..Open("P:\Spreadsheet Project\WrapUp\" & WrapUpTemplate) _
..Application.Visible = True

wdApp.Activate
With wdApp

....various word coding to copy text into template (this all works
fine)

DocumentSave1

End with

I just don't know how to get it to go to the Word macro. I have tried
moving DocumentSave1 to the Modules folder, but that does not seem to
work either.

Any help with this would be very gratefully received,

Paul


--
PaulC
------------------------------------------------------------------------
PaulC's Profile: http://www.excelforum.com/member.php...fo&userid=7563
View this thread: http://www.excelforum.com/showthread...hreadid=534989

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default Running a Word macro from Excel problem

..Run "DocumentSave1"

"PaulC" wrote:


I am trying to run a Word macro from Excel. The Macro, called
DocumentSave1 is saved in the ThisDocument folder of the WrapUpTemplate
file (see code). The relevant part of the code is:

Dim wdApp as Word.Application

Set wdApp = CreateObject("word.application")

wdApp.Documents _
.Open("P:\Spreadsheet Project\WrapUp\" & WrapUpTemplate) _
.Application.Visible = True

wdApp.Activate
With wdApp

....various word coding to copy text into template (this all works
fine)

DocumentSave1

End with

I just don't know how to get it to go to the Word macro. I have tried
moving DocumentSave1 to the Modules folder, but that does not seem to
work either.

Any help with this would be very gratefully received,

Paul


--
PaulC
------------------------------------------------------------------------
PaulC's Profile: http://www.excelforum.com/member.php...fo&userid=7563
View this thread: http://www.excelforum.com/showthread...hreadid=534989


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Running a Word macro from Excel problem


Martin

Many thanks. I found it worked with just one period in front of Run:

..Run "DocumentSave1"

Thanks again,

Paul


--
PaulC
------------------------------------------------------------------------
PaulC's Profile: http://www.excelforum.com/member.php...fo&userid=7563
View this thread: http://www.excelforum.com/showthread...hreadid=534989

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel running Word macro rsphorler Excel Discussion (Misc queries) 2 May 27th 07 01:19 AM
Strange problem running Word from Excel Robin Excel Programming 5 May 3rd 05 10:22 PM
Excel macro to control Word Problem Dave R[_3_] Excel Programming 5 July 31st 04 10:35 PM
running a word macro from xl steve Excel Programming 0 May 3rd 04 02:33 PM
running a word macro from xl Steve Excel Programming 0 April 30th 04 08:56 PM


All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"