LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Word Library reference

Any idea what I have to change to make this work without have the MS Word
Object reference checked? OR is there a way to automatically select the word
object library if the user does not have it checked?


Set WordApp = CreateObject("word.application") 'open Word session
WordApp.Visible = True 'Word visible during operation
WordApp.Activate
Set WordDoc = WordApp.Documents.Open(file_path) 'open Word doc

On Error Resume Next
With WordDoc.Content.Find
With .Replacement
End With
.Execute findtext:="<release plan status", ReplaceWith:="Initial", _
Replace:=wdReplaceAll
.Execute findtext:="<project/RIA ", ReplaceWith:="Project", _
Replace:=wdReplaceAll
.Execute findtext:="<project#", ReplaceWith:=strProjNum & " ", _
Replace:=wdReplaceAll
.Execute findtext:="<project name - or - <RIA name", _
ReplaceWith:=" " & strProjName, Replace:=wdReplaceAll
.Execute findtext:="<mm/dd/yyyy hh:mm A ", ReplaceWith:=strRlsDate, _
Replace:=wdReplaceAll
End With
WordDoc.Tables(1).Rows(2).Range.Font.Color = wdColorBlue
WordDoc.Tables(1).Rows(2).Range.ParagraphFormat.Al ignment =
wdAlignParagraphCenter
WordDoc.Tables(1).cell(2, 1).Range.text = "P & C Property Systems"

WordDoc.Tables(2).Rows(2).Range.Font.Color = wdColorBlue
WordDoc.Tables(2).cell(2, 1).Range.text = "1.0"
WordDoc.Tables(2).cell(2, 2).Range.text = Date
WordDoc.Tables(2).cell(2, 3).Range.text = "Created Document"
WordDoc.Tables(2).cell(2, 4).Range.Font.Color = wdColorAutomatic

On Error GoTo Err_WordDocs

 
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
Naming word tables or coding reference library with vba hornbecky83 Charts and Charting in Excel 6 January 21st 07 01:11 AM
Add-ins and Reference library Glen Mettler[_4_] Excel Programming 1 December 5th 04 11:41 AM
Reference Library - Missing Library in a lower version. luvgreen Excel Programming 1 October 7th 04 02:08 AM
adding reference to the Word-Library Guido van Gemerden Excel Programming 1 June 15th 04 09:56 AM


All times are GMT +1. The time now is 07:34 AM.

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

About Us

"It's about Microsoft Excel"