Bill Hamilton
Board Regular
- Joined
- Mar 30, 2004
- Messages
- 95
I have an Excel macro that starts up Word and creates labels (the little 65/sheet variety). I'm using the standard method of starting Word (Set Wrd = GetObject(, "Word.application")) and the Word instance is immediately given the 'Wrd.Visible=False' treatment so the activity that takes place to populate the label doc is not shown to the user and runs much, much faster than it would do if the doc was visible.
All that works fine under Windows. However, I need to port this application to work under Excel (and Word) on a Mac but the 'Wrd.Visible=False' instruction does absolutely nothing: the Word doc remains visible and the the label-creation code takes ages because of all the screen updating that's taking place. I can watch each line of each label being written out. Label runs can go from 20 or so to over 10,000 so this is important.
I've tried using 'Wrd.Application.WindowState = wdWindowStateMinimize' and that is accepted under Windows but is flagged with 'Run-time error 4231: This command is not available' when run on the Mac. I'm using the enumeration value of 2 for the Minimize keyword.
Does anyone know how to make a Word doc go away while it's being updated when running under Excel for Mac? It's a bit of a showstopper for this application if it can't be done.
I'm using Office 2016 under Windows 10 and Office 2019 on a MacBook Pro under Catalina.
All that works fine under Windows. However, I need to port this application to work under Excel (and Word) on a Mac but the 'Wrd.Visible=False' instruction does absolutely nothing: the Word doc remains visible and the the label-creation code takes ages because of all the screen updating that's taking place. I can watch each line of each label being written out. Label runs can go from 20 or so to over 10,000 so this is important.
I've tried using 'Wrd.Application.WindowState = wdWindowStateMinimize' and that is accepted under Windows but is flagged with 'Run-time error 4231: This command is not available' when run on the Mac. I'm using the enumeration value of 2 for the Minimize keyword.
Does anyone know how to make a Word doc go away while it's being updated when running under Excel for Mac? It's a bit of a showstopper for this application if it can't be done.
I'm using Office 2016 under Windows 10 and Office 2019 on a MacBook Pro under Catalina.