Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers,microsoft.public.word.programming,microsoft.public.word.vba.general
John[_9_] John[_9_] is offline
external usenet poster
 
Posts: 10
Default Late binding code

Hi

I have the below code to create a word document programmatically. What would
be the late binding version of this code?

Many Thanks

Regards


Dim obj As Word.Application

Set obj = GetObject(, "Word.Application")

obj.ActiveDocument.Activate

With obj
.Selection.Text = "Some text..."
End With

obj.Visible = True
Set obj = Nothing



  #2   Report Post  
Posted to microsoft.public.word.newusers,microsoft.public.word.programming,microsoft.public.word.vba.general
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Late binding code

Replace

Dim obj As Word.Application

with

Dim obj As Object


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"John" wrote in message
...
Hi

I have the below code to create a word document programmatically. What
would be the late binding version of this code?

Many Thanks

Regards


Dim obj As Word.Application

Set obj = GetObject(, "Word.Application")

obj.ActiveDocument.Activate

With obj
.Selection.Text = "Some text..."
End With

obj.Visible = True
Set obj = Nothing





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Cause Letter for Late Attendance Cindy Mak Microsoft Word Help 3 September 25th 06 11:59 AM
LETTER FOR A LATE DOCTOR'S STATEMENT word general questions Microsoft Word Help 2 March 23rd 06 09:44 PM
How do I write a letter for late invoicing of customers? Late invoicing Microsoft Word Help 2 June 1st 05 12:32 AM
I am explaining why I were late paying my rent a few times, I am . HELP Microsoft Word Help 1 April 13th 05 01:33 PM
Editing bookmarks in Word using late binding Tommy Microsoft Word Help 1 November 29th 04 04:58 PM


All times are GMT +1. The time now is 01:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"