|
-
Jul 19th, 2000, 07:03 AM
#1
Thread Starter
Junior Member
HI all,
I'am printing to a word document.
When I reopen the document I print at die top of the document.
Who can I get to the buttom of the document, or send Ctrl +end send to the word document.
Thanks.
-
Jul 19th, 2000, 07:41 AM
#2
Addicted Member
Not sure about this as I have not tried it yet.
If you have a Word Object in your VB Application can you not do this?
MyWordObject.GoTo.End
If this does not work try the SendKeys method? Just some thoughts. I will go and try it now.
-
Jul 19th, 2000, 08:32 AM
#3
Thread Starter
Junior Member
HI all,
I tried it but still write at top of document.
ObjWord.ActiveDocument.GoTo.EndOf
Any other options ? How would the sendkeys work?
-
Jul 19th, 2000, 08:40 AM
#4
Addicted Member
This works, I've just tried it.
wdApp.Visible = True
wdApp.Activate 'Activate Word.
SendKeys "^{END}", True 'Send CTRl+END to go to end.
Hope this helps.
-
Jul 19th, 2000, 04:45 PM
#5
Fanatic Member
To send the <Ctrl> + <End>, you could use the SendKeys thingie. However, I like this way of navigating better:
Code:
With myWordObj.Selection
.EndKey wdStory ' End of Doc
.HomeKey wdStory ' Start of Doc
.EndKey wdLine ' End of Line
.HomeKey wdLine ' Beginning of Line
.MoveRight wdWord, 1 ' One Word right
.MoveLeft wdWord, 1 ' One Word left
End With
To insert a <Tab> or <Enter> character in your document use this:
Code:
With myWordObj.Selection
.TypeText vbTab ' TAB character
.TypeParagraph ' ENTER character
End With
With respect to make Word running hidden, just set it's Visible property to False. See also my post on how to properly interact with MS Word here http://forums.vb-world.net/showthrea...threadid=23336.
Hope this helps.
-
Jul 20th, 2000, 03:10 AM
#6
Thread Starter
Junior Member
HI Thanks HaxSoft
It works now . I still have I problem with the tab.
Name : Stephan
Date of birth : 13/03/67
Must look like
Name : Stephan
Date of birth : 13/03/67
Problem with website ,but the : must be directly under each other.
Can anybody help ,with change the tab starting adress perhaps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|