Interaction between Excel and Word OLE

I am using Office 2007 to write procedures but a problem is apparent only when run on Office 2013.
A procedure in a workbook that records Sales information runs to transfer data to another workbook that stores Invoice information, and then opens Word to generate a mail merge document from a template (dotm) which has an event procedure (on Open) to merge
data from the Invoice spreadsheet into a document to produce an invoice.  This procedure works without problem on the Office 2007 (Vista) machine and until recently likewise ran without problem on the Office 2013 (Windows 8.1) machine.  However,
apparently following an automatic update to the Office 2013 machine, when the Word document is generated the procedure "hangs" at the point of reading the data from the Invoice workbook, and after a longish delay a message is generated along the
lines of the program awaiting an OLE action.  The only way to stop the whole process is via task manager.
After much research I have found that on the Office 2013 machine, the mail merge of data from the Invoice workbook will not now work if the Invoice workbook is open, bot works OK if it is closed.
I have therefore programmatically closed the Invoice workbook, and the procedure now works on the Office 2013 machine (and on the Office 2007 machine).  However, I would like the Invoice workbook to be open when the Word document has been generated. 
I therefore inserted a few seconds wait into the procedure to allow the mail merge to be completed, then tried to reopen the Invoice workbook.  I now get the message that the Invoice workbook is locked for editing, and asking if I want to open a read
only copy (which I don't).  The Invoice workbook does not appear on the task bar, nor does it appear in task manager.  I have tried code to make it active and I then get "subscript out of range", and I have tried code to make it visible
and I again get "subscript out of range".  However, if I close down the word documents generated with the data from the Invoice workbook, I can then open it;  presumably the merge process is treated as still being in progress while the
documents are open, and the Invoice workbook is "released" when the documents are closed.
Has anyone any advice to offer on how to deal with this problem of not being able to open the Invoice workbook while the mail merge documents are open.  The problem is apparent in both Office 2007 and 2013.

Hi Caillen
Thanks for looking at this.  I should explain that I do all my work on an Office 2007 machine for a family member who lives elsewhere, so I don't have direct access to the Office 2013 machine.  However, they are reasonably computer literate and
report faults accurately.  To deal with your queries:
1.  Their Office (and Windows) updates are installed automatically.  Basically, their systems are kept up to date.  It is only a guess that an update may have caused the problem, for the procedure worked as expected for some months and no
other changes have been made.  The problem does not occur on my Office 2007 machine.
2.  For the initial problem there was no error message initially;  the little circle just kept going round for a minute or so, then a message appeared on the Office 2013 machine saying that Excel was waiting for another program to complete an OLE
action.  That message no longer appears because I have cured the problem by closing the workbook that is the data source for the mail merge.
3.  I do indeed mean VBA code by procedure (Sub xxx()).  The code in the Word Template on which the procedure originally hung up was the third line below - i,e, the line starting ActiveDocument.MailMerge.OpenDataSource Name:= _
Sub ctPrintInvoice()
    ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
    ActiveDocument.MailMerge.OpenDataSource Name:= _
        ThisDocument.Path & "\ColTarInvoices.xlsm", _
        LinkToSource:=True, _
        Revert:=False, _
        Format:=wdOpenFormatAuto, Connection:="DETAILS", _
        SQLStatement:="SELECT * FROM `'Print Invoice$'`", SQLStatement1:=""
"DETAILS" is a named range within the workbook that is the data source for the mail merge.  "Print Invoice" is the name of the worksheet that holds the data.  This code runs as an event on opening the document, which is done
automatically within the code in the workbook.  The code in the Sales workbook to open the document is:
    Set objWord = CreateObject("Word.Application")
    If strSourceSheet = "Sales" Then
        Set objctMergeDoc = objWord.Documents.Add(ThisWorkbook.Path & "\ctInvoice1.dotm")
    ElseIf strSourceSheet = "Euro Sales" Then
        Set objctMergeDoc = objWord.Documents.Add(ThisWorkbook.Path & "\ctEuroInvoice1.dotm")
    End If
    objWord.Visible = True
    Set objWord = Nothing
    Set objctMergeDoc = Nothing
However, the procedure also hung in the same place on the Office 2013 machine if the document was opened manually.
4.  The code in the Sales workbook to close the Invoice workbook is:
   Workbooks("ColTarInvoices.xlsm").Close
The code to reopen it is:
   Workbooks.Open (ThisWorkbook.Path & "\ColtarInvoices.xlsm")
This generates the message that the workbook is locked for editing.  The same message is generated if I try to open the workbook manually while the merged documents are still open.
(The files are all in the same folder)
With thanks
Andy C

Similar Messages

  • Not enough memory or disk space in excel and word office 365

    I have windows 8.1 and am having huge issues with excel and word in office 365.
    When i download a document i am unable to open as message reads cannot open as not enough memory or disk space.
    I have plenty of disk space and memory however have searched this and the following has been answered BUT I CANNOT UNDERSTAND This and need HELP  with step by step instructions on how to do please;
    To resolve the issue, refer to the methods below:
    Go to this key on Registry Editor (Run | Regedit)HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
    Shell Folders
    change key Cache to something like C:\Windows\Temp
    You might also right click on the file with file explorer, choose Properties, then General tab and click on the Unblock button.
    Some of our customers found it sometimes a permission problem.
    cmd  => dcomcnfg
    Click >Component services >Computes >My Computer>Dcom config> and select micro soft Excel Application>
    Right Click on microsoft Excel Application>Properties>Give Asp.net Permissions
    Select Identity table >Select interactive user >select ok
    However i do not understand a word of the above or how to do PLEASE HELP this is extremly frustrating as i am doing correspondence and I am unable to access any files.
    Thanks

    Hi,
    You must have read this thread:
    http://social.technet.microsoft.com/Forums/en-US/9773a7c4-29a8-48ff-9d16-e1ca4c478610/excel-2013-microsoft-excel-can-not-open-or-save-anymore-documents-because-there-is-not-enough?forum=officesetupdeploy
    To detail the steps, please do as I describe:
    Important
    This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the
    registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry,
    http://windows.microsoft.com/en-US/windows7/Back-up-the-registry
    To open the Registry Editor, please press Win + R, type regedit in the blank box, press
    Enter. / Or we can type regedit.exe in Windows 8.1 Search, you'll find it easily.
    Now the Registry Editor is open.
    Then we see the pane on left, expand the following path:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
    Then we can see a list on right, find Cache, right click on it, click
    Modify..., under Value data, change the value to something like
    C:\Windows\Temp, click OK.
    Exit Registry Editor.
    As for "You might also right click on the file with file explorer, choose Properties, then General tab and click on the Unblock button." Just find the file, right click on it, choose
    Properties, under General tab, if you see a
    Unblock button, click on it.
    "Some of our customers found it sometimes a permission problem.
    cmd  => dcomcnfg" Do the following:
    Press Win + R, type in cmd in the blank box, press
    Enter.
    In the new black-background window, type in dcomcnfg, press
    Enter.
    Then the Component Services window will pop up, on the left pane, expand
    Component services -> Computes ->
    My Computer -> Dcom config -> and select
    Microsoft Excel Application, right click on it -> Properties ->
    Identity tab -> Select The interactive user ->
    OK.
    I hope I've explained the steps clearly.
    Good luck.
    Regards,
    Melon Chen
    TechNet Community Support

  • How can I download excel and word

    I need work in excel and word in my iPed - please guide

    You cannot download or install Word or Excel for the iPad. MS has not released an iOS version.
    There are MS Office compatible apps available in the app store like Quick Office Pro and Documents to Go. Take a look at those and see what you think. Apple also has their iWorks suite of apps, Pages, Numbers and Keynote that are compatible with the MS Office apps.

  • How can I use excel and word on the IPAD2

    How can I use excel and word documents on my Ipad 2

    There are apps such as Documents To Go which support reading/editting/creating those sorts of documents :
    standard version  -  http://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    premium version  -  http://itunes.apple.com/us/app/documents-to-go-premium-office/id317107309?mt=8

  • After hours of back-up, downloading and uploading...I am now updated with all the latest Mac software. However, I no longer have access to Excel and Word. Is there a way I can access my documents in either of those? Help, please.

    After hours of back-up, downloading and uploading...I am now updated with all the latest Mac software. However, I no longer have access to Excel and Word. Is there a way I can access my documents in either of those? Help, please.

    If you have older versions of excel and word that previously ran under the Rosetta emulator (allows PowerPC code to run on Intel system), they will no longer work with Lion.
    You can use the Apple programs Pages and Numbers to access the files. They can be bought and downloaded from the App store. NeoOffice is available at http://www.neooffice.org/neojava/en/index.php which has Lion support. OpenOffice doesn't talk to Lion support, it's at http://www.openoffice.org/

  • I upgraded to mountain lion a week ago and now on startup of my macbook pro, microsoft excel and word start up automatically and then crash? very strange can anyone please help? I have checked the login items under users and groups and there is nothing.

    I upgraded to mountain lion a week ago and now on startup of my macbook pro, microsoft excel and word start up automatically and then crash? very strange can anyone please help? I have checked the login items under users and groups and there is nothing.

    Are you using the Office for Mac 2011 version, as you need to do?  The Office for Mac 2004 is Not at all compatible with Mountain Lion, and the 2008 version has been noted to have some problems running with ML.
    Hope this helps

  • I want to get an app where i can work power point, excel, and word?

    i heard about keynote, numbers, and letters. I tried to find it, but i couldnt. Thank you for your patience and effort,
    Laura Diaz

    Lacadiga
    I would suggest using Office for Mac and you need to buy it at a physical Apple store or downlaod from Microsoft.  It is a fully functioning and compatible with MS Office.  It's about 150$.
    I tried the various Apple products - like Numbers- and they are not as sophisticated as the Office products.  As well, if you are going to store Office products in the Apple icloud then they get converted to the various Apple i-products - ugh, it make s a mess.
    So I store all my Powerpoint, Excel and Word documents on Skydrive cloud where they are stored as native office products.
    Cheers

  • Acrobat Pro XI . converting of excel and word to pdf

    After installing Acrobat Pro XI two days ago, the conversions of excel and word to pdf are less than optimal.  Poor fonts, color and sometimes blurry.

    That's very kind of you Bill.
    Since my last forum post I have uninstalled Acrobat Pro, - with its updates - and reinstalled the original from disk. The conversion from Word 2007 to PDF is working fine. And that was where I was prepared to leave it. Of course any updates would not be possible.
    However, since you have offered to help, I'd be most grateful of any assistance.
    To answer your question, the usual way I create PDF files from Word is from within the open Word program. From there I can simply 'Save As' to PDF format.
    That's the way MS says to do it. Is there another way? The updates stop this working. The process begins but then stops part way through and dies. No pdf file is created.
    I'm not familiar with the print to file option. I had a look at print options from within Word but no mention of any PDF Maker although Adobe PDF is listed as a printer. However, if I try to print to Adobe PDF I get an error saying there is an error in the printer setup.
    With thanks
    Robert

  • Excel and Word 2011 crash on opening

    I'm not sure if this is a more common issue from earlier versions of office, but with the combination of Lion and Office 2011 I am having repeated issues. For reference I am using a new Mac Air i5 with plenty of disk space and memory.
    In summary, Excel and Word worked for a while, but once a file crashes for some reason then I cannot open either application at all - just stuck in the endless loop of crash on attempting open and then re-open to no effect.
    I have tried several solutions including:
    - complete office re-install (worked for a few days until the next crash)
    - holding "shift" (no effect)
    - deleting temp files and plist files following online forum advice (no effect)
    Note: I am not using complex excel files with macros (etc), just dropbox copies of simple spreadsheets.
    Can anyone else offer an alternative solution?

    Hi!
    I got this crash as well. followed the instructions to delete the plist file and holding the shiftkey did not work for me. The is the bit that bites...removed Office 2011 as per instructions and still only Excel does not work.
    Anyone know of a solution? Seems like the latest update on my machine was a Java update from Apple.
    Here is my error log.
    Error Signature:
    Exception: EXC_BAD_ACCESS
    Date/Time: 2012-09-10 18:00:44 +0800
    Application Name: Microsoft Excel
    Application Bundle ID: com.microsoft.Excel
    Application Signature: XCEL
    Application Version: 14.2.3.120616
    Crashed Module Name: CoreFoundation
    Crashed Module Version: 550.44
    Crashed Module Offset: 0x0001a2c3
    Blame Module Name: CoreFoundation
    Blame Module Version: 550.44
    Blame Module Offset: 0x0001a2c3
    Application LCID: 1033
    Extra app info: Reg=en Loc=0x0409
    Crashed thread: 0

  • Windows of excel and word pop up on desktop.i have unchecked the option for windows on pop.

    windows of excel and word pop up on desktop.i have unchecked the option for windows on pop.but still dey show up

    Whaat version of Mac OS X?
    When do the windows show up?

  • What about programs like excel and word? college students need these!!!

    college students need to be able to access files, send files, and store files using the programs excel and word, why cant i have these on my iphone?

    You can email then to your iphone.
    Use plain text format when emailing them.
    But as for saving them and editing them on the iphone, you can't.
    You cannot save or download and save to memory on the iphone.
    Hope this helps.

  • Interaction between BSP and SAP GUI

    Hello all,
    I am having trouble with interaction between BSP and dynpros:
    I have a dynpro with a container where a BSP is shown.
    I would like to be able to return a value from the BSP to the control program of the dynpro.
    Any ideas of how to do it?
    Thanks a lot!
    Helpful answers will be regarded.

    Hello both,
    thank you for your replies, but I am still not able of performing this.
    I have tried using GET/SET parameters but it is not working, I get no parameter (perhaps I am not using the sentences correctly or in the correct place).
    I have also tried the code of demo program SAPHTML_EVENTS_DEMO and I think I cannot do it, I explain it a bit more:
    I have a button on my  BSP with some code programmed on event OnInputProcessing to be executed, and at the end I would like to return one value to the control program of the dynpro.
    But if I set the html form of the BSP as action:SAPEVENT, the bsp code is not executed...
    Am I doing something wrong?
    Thanks!!

  • PDF creating - Excel and Word - page size

    When using PDF maker in Excel and Word, A4 always gets converted to US Letter size.  Is there any way of correcting this?

    "an error message" really doesn't tell us much.
    [topic moved to ExportPDF forum]

  • Working with EXCEL and WORD files on a Mac Pro

    Hello,
    I have a lot of EXCEL and WORD files and the compatibility with NUMBERS and PAGES is not really satisfying. Is there a EXCEL and WORD app which runs without surprises on a Mac Pro?

    Welcome to Apple Support Communities
    Microsoft sells its own Microsoft Office version for OS X > http://www.microsoft.com/mac Microsoft Office for Mac will be the application that will give you less headaches when using Office documents, so I recommend it.
    Another application you should consider is LibreOffice, which is free > http://www.libreoffice.org

  • Can I free download excell and word with mac

    I would like to download free excell and word. I can find many offer. Are there any risk to get VIRUS? Any suggested website?

    Hi,
    The above advice is sound.
    If you see free versions of Office or components like Word and Excel separately, then they are likely to be trouble.
    Mostly that are likely to include Malware, possibly Trojans but Viruses are are unlikely as there is no recorded Mac OS X virus in the wild (Anywhere outside Lab conditions).
    That is not to say that there will not be a Virus at some point and a free download is just the sort of vehicle those bad people will use.
    10:36 PM      Sunday; September 25, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • Airport Extreme problems--drops connection and can't change password

    Hi, I am having multiple problems with my Airport Extreme (n) base station. All of these problems occur on all three of my machines. MacBook Pro 2007 model, MacBook Pro i7 2.66, and iMac 24". 1. Sometimes the airport connection works, but then drops

  • Using the same TableModel with different tables

    hi, is it possible to have a TableModel class that I could use to display different columns in different tables? For example, suppose I have a TableModel containing user info (user_id, user_name, user_address) and I wanted to display (user_name, user

  • Strange "Help Icon" on start up

    My G4 won't startup fully. I get a strange blue on white help icon in the upper right corner of the screen and that's it. The full menu bar never finishes coming up. I have tried repairing the disk, first with the install CD then with Disk Warrior. D

  • Infinite for loop

    hi I have the following for loop: for (TreeMap <String, Integer> i = result; i.size()!=0; i.headMap (i.lastKey())) {out.println("keyword = " + i.lastKey() + " ; page no. = " + i.get(i.lastKey())); result is a tree map that contains several strings (t

  • Transfer content of BO XI 3.1 from production to test

    Hi all! I have separate production system BO XI R3.1 FP 1.3 and a test system BO XI R3.1 FP 1.7. After a crash I tried to use the import wizard to move the content of production to test. When I create a biar file with the Import Wizard under 1.3, thi