PasteExcelTable does not work in OS X

  • Thread starter Thread starter Mikec007
  • Start date Start date
M

Mikec007

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.
 
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.
 
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
 
Back
Top