Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Word-Object: Type mismatch

Hi everybody,

with a new machine (Vista Small Business, Office XP) and
all references set, Word running,
like done a hundred times before,

yet,

Dim oWrd As Word.Application
Set oWrd = GetObject(, "Word.Application") ' type mismatch

same when trying to control Word from Powerpoint.

From Word, this is not a problem:

Dim oExc As Excel.Application
Set oExc = GetObject(, "Excel.application") ' fine




--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Word-Object: Type mismatch

I use this with WinXP Home and Office 2003:

Dim oWord as Word.Application
On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If



Helmut Weber wrote:

Hi everybody,

with a new machine (Vista Small Business, Office XP) and
all references set, Word running,
like done a hundred times before,

yet,

Dim oWrd As Word.Application
Set oWrd = GetObject(, "Word.Application") ' type mismatch

same when trying to control Word from Powerpoint.

From Word, this is not a problem:

Dim oExc As Excel.Application
Set oExc = GetObject(, "Excel.application") ' fine

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
object on RHS when there is a type-mismatch [email protected] Excel Programming 0 October 12th 06 02:00 AM
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Setting range object--Type mismatch if template not used [email protected] Excel Programming 2 April 25th 06 05:20 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"