View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mikec007 Mikec007 is offline
external usenet poster
 
Posts: 3
Default 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.