ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PasteExcelTable does not work in OS X (https://www.excelbanter.com/excel-programming/443927-pasteexceltable-does-not-work-os-x.html)

Mikec007

PasteExcelTable does not work in OS X
 
Something that I ran into today. When pasting a range from excel into
a new word document,

Section.PasteExcelTable

works great in windows but errors in Office 2011 for Mac.

I also had the problem when first writting the code.

wdApp.Selection.PasteExcelTable(False, False, True) gives a syntax
error looking for an "="

but wdApp.Selection.PasteExcelTable False, False, True works just fine.


GS[_5_]

PasteExcelTable does not work in OS X
 
I also had the problem when first writting the code.

wdApp.Selection.PasteExcelTable(False, False, True) gives a syntax error
looking for an "="


That happens when you put args in parenthesis for any proc.


but wdApp.Selection.PasteExcelTable False, False, True works just fine.


The rule is if you're not expecting a return then don't send an
envelope (ie: envelope = args wrapped in parenthesis) In this case
you're just passing parameters to PasteExcelTable method, which doesn't
return anything such as would be the case if it was a function that
returned a value or reference.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc



Mikec007

PasteExcelTable does not work in OS X
 
Ok. Thanks, I understand what you are saying. I couldn't figure out
why it was giving me an error when I was writting it. Thanks again.

Mike

On 2010-11-21 19:07:32 -0500, GS said:

I also had the problem when first writting the code.

wdApp.Selection.PasteExcelTable(False, False, True) gives a syntax
error looking for an "="


That happens when you put args in parenthesis for any proc.


but wdApp.Selection.PasteExcelTable False, False, True works just fine.


The rule is if you're not expecting a return then don't send an
envelope (ie: envelope = args wrapped in parenthesis) In this case
you're just passing parameters to PasteExcelTable method, which doesn't
return anything such as would be the case if it was a function that
returned a value or reference.





All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com