Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Canberra, Australian Capital Territory, Australia
    Thanked 0 Times in 0 Posts

    Automation-Excel to Word-Waiting for OLE Action (Excel 97)


    I keep getting a message dialogue: "Microsoft Excel is waiting for another application to complete an OLE action."

    I have an Excel sheet which does a CreateObject to open a new Word file and run more VB code from the Word template.

    The VB code in Word has a GetObject to copy data from an Excel file into the new Word file. There is a lot of processing and formatting to be done in getting the Excel data into the Word file.

    I get about 50% of the way through when the above message appears. Processing seems to stop until I click on "OK" but remains slow from then on.

    I tried using a conditional public variable (boolean) as per another post (see here: OLE&Match=And&Searchpage=0&Limit=size=3&Old=allpos ts&Main=102620) but, it didn't work for me.

    Is there any way to stop the message appearing ?

    Many thanks.
    <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Weert, Limburg, Netherlands
    Thanked 0 Times in 0 Posts

    Re: Automation-Excel to Word-Waiting for OLE Action (Excel 97)

    You say there is code on the WOrd side that uses createobject to get data from Excel. Why not have all code in XL and have Excel "push" the information to the Word side of your project? Sounds as if now you are running around in circles (creating a word object in XL and then creating an XL object in Word).
    So (untested, just trying to clarify):

    Dim oWordApp as Object
    Set oWordApp=CreateObject("Word.Application")
    With oWordApp
    'Now start formatting
    .activedocument.SavAs Filename:="Whatever"
    End With
    Set oWordApp=Nothing
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts