A simple little task, but I'm not getting it!
Move to the start of an opened Word document
[VBA]
Set MyRange = Wd.ActiveDocument
With MyRange
.MoveStart Unit:=wdStory, Count:=-1
End With
[/VBA]
A simple little task, but I'm not getting it!
Move to the start of an opened Word document
[VBA]
Set MyRange = Wd.ActiveDocument
With MyRange
.MoveStart Unit:=wdStory, Count:=-1
End With
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
That snippet is trying to move the active document to the start of a, (unspecified,) document.
Perhaps ypu want
[vba]
'This example applies bold formatting to the first 10
'characters in the active document.
Sub DocumentRange() ActiveDocument.Range(Start:=0, End:=10).Bold = TrueEnd Sub[/vba]
HTH. Dave
http://peltiertech.com/Excel/EarlyLateBinding.html
"The easiest way to determine the values of these constants is, before removing the reference to the other application's object model, finding it in the Object Browser, or in the Immediate Window, typing a question mark followed by the constant name, then pressing Enter"
Thanks both
This does what I need
[VBA]
Wd.Selection.HomeKey Unit:=6
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Also
[vba]Wd.Selection.Collapse 0[/vba]
David
Thanks
I'll try that tomorrow.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'