Hi All,
I'm having some trouble with caputring and passing the result of my "Decimal Search" loop to the code which populates the bookmark I have stored in a Word Template.
I have looked around the forums and can't quite find what I'm looking for (partly as I'm sturggling with the search terms).
Here is my decimal & bookmark code;
Sub Pallet_Marker()
Dim wrdApp As Word.Application
Dim strTemplateName As String
Dim aCell As Range
'Decimal
For Each aCell In Range("I16:I35")
If aCell.Value <> Int(aCell.Value) Then
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
strTemplateName = "C:\Documents and Settings\bethan\My Documents\Pallet Markers\1.dot"
Set wrdDoc = wrdApp.Documents.Add(strTemplateName)
Application.ScreenUpdating = False
With wrdDoc
.Bookmarks("CustName").Range.Text = Range("C8").Value
.Bookmarks("Ref").Range.Text = Range("D16").Value
.Bookmarks("SpecNo").Range.Text = Range("B16").Value
.Bookmarks("Qty").Range.Text = Range("C16").Value
.Bookmarks("RCLon").Range.Text = Range("J8").Value
.Bookmarks("Custon").Range.Text = Range("A16").Value
.Bookmarks("DeliveryAdd").Range.Text = Range("C13").Value
MsgBox "Decimals"
End With
Exit For
End If
I need to add the found row to the all the ranges "C16","A16", any range with Row"16", the others are static.
Any help would be great!
Bookmarks