ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Bookmarks help (https://www.excelbanter.com/excel-programming/324898-bookmarks-help.html)

Adam

Bookmarks help
 
I keep getting an error for "object does not suppor this property"

I followed the code correctly by all the sites, any ideas?

Const fname = "C:\intestimate.doc"

Set x = CreateObject("Word.Application")
x.Documents.Open Filename:=fname, ReadOnly:=False
x.Visible = True


For i = 2 To 2
String0 = Worksheets("Bid").Cells(1, 2).Value & " : " &
Worksheets("Bid").Cells(i, 2)
String1 = "All Preparation Work as Stated Above"
String2 = Worksheets("Bid").Cells(1, 15).Value & " : " & "Apply " &
Worksheets("Bid").Cells(i, 15).Value & " coats interior flat latex paint of
highest quality"
String3 = Worksheets("Bid").Cells(1, 20).Value & " : " & "Apply " &
Worksheets("Bid").Cells(i, 20).Value & " coats interior flat latex paint of
highest quality"


scopeofwork = String0 & vbCr & String1 & vbCr & String2 & vbCr & String3
x.Bookmarks("ScopeofWork").Range.Text = scopeofwork

Next i


All times are GMT +1. The time now is 12:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com