Reply
 
Thread Tools Display Modes
  #1   Report Post  
Esgrimidor Esgrimidor is offline
Junior Member
 
Posts: 8
Default enter in a part of a word document

This is my first post. Best Regards everybody.


a VB script for enter in word to a part of the document

(a prefixed page, a mark, a table, a jpg, a comment ? , the first occurrence of a character string, a epigraph....... )

I would like enter in a word document looking for a text string and position the cursor in the string.
I will know the existence of this chain always, so any other mark or signal would be enough.
All I need is enter in a certain part of a document identified previously.

Thanksxxx
  #2   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default enter in a part of a word document

Why not use EditFind?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"Esgrimidor" wrote in message
...

This is my first post. Best Regards everybody.


a VB script for enter in word to a part of the document

(a prefixed page, a mark, a table, a jpg, a comment ? , the first
occurrence of a character string, a epigraph....... )

I would like enter in a word document looking for a text string and
position the cursor in the string.
I will know the existence of this chain always, so any other mark or
signal would be enough.
All I need is enter in a certain part of a document identified
previously.

Thanksxxx




--
Esgrimidor


  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default enter in a part of a word document

Please do not post the same questions in multiple groups

Dim sMark As String
sMark = InputBox("Term to find")
With Selection
.HomeKey wdStory
Do While .Find.Execute(sMark) = True
.Range.Characters(1).Select
Exit Do
Loop
End With

will select the first character of the requested term

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Esgrimidor wrote:
This is my first post. Best Regards everybody.


a VB script for enter in word to a part of the document

(a prefixed page, a mark, a table, a jpg, a comment ? , the first
occurrence of a character string, a epigraph....... )

I would like enter in a word document looking for a text string and
position the cursor in the string.
I will know the existence of this chain always, so any other mark or
signal would be enough.
All I need is enter in a certain part of a document identified
previously.

Thanksxxx



  #4   Report Post  
Esgrimidor Esgrimidor is offline
Junior Member
 
Posts: 8
Default

I'll try and comment the results.

Thanksxxx and excuse me for multiple posting.


Edited : I have seen The TOC . Another purpose may be go to a part of the TOC in the document

Thanksss

Last edited by Esgrimidor : August 24th 09 at 05:40 PM
  #5   Report Post  
Esgrimidor Esgrimidor is offline
Junior Member
 
Posts: 8
Default

[quote=Doug Robbins - Word MVP;430236]Why not use EditFind?

Because I need to enter in the word document automatically to that bookmark from the "exterior".

A vbs script from start - execute may be.

Best Regards


  #6   Report Post  
Esgrimidor Esgrimidor is offline
Junior Member
 
Posts: 8
Default

Quote:
Originally Posted by Graham Mayor View Post
Please do not post the same questions in multiple groups

Dim sMark As String
sMark = InputBox("Term to find")
With Selection
.HomeKey wdStory
Do While .Find.Execute(sMark) = True
.Range.Characters(1).Select
Exit Do
Loop
End With

will select the first character of the requested term

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Esgrimidor wrote:

a VB script for enter in word to a part of the document

(a prefixed page, a mark, a table, a jpg, a comment ? , the first
occurrence of a character string, a epigraph....... )

Thanksxxx
I try to explain better again.
I need automatically by this script :

1. Open a Word document
2. Go to a prefixed part of this document without my intevention.

Examples :

1. Open the document C:\path\inform\document.doc

and goes to the page 10


2. Open the document C:\path\inform\document.doc

and goes to the bookmark "wordbanter" in page 25


I think I can do this in many ways. One perhaps I am able is preparing an "internal" macro to go to a part of that document when I execute the macro from inside the document.

Using word modifiers of the command line execute the macro at the same time I open Word. 8http://office.microsoft.com/es-es/word/HP101640103082.aspx?pid=CH100487463082 )

But what I really want to know is the code in VB to make a script to execute outside Word. (please, I only have a text editor and don't need the script to be compiled,,). For me is enough a .vbs file.

That is : Start - Execute - script.vbs

This script.vbs may have the code for opening the desired word document and goes to a certain part of this document automatically. I don't know the names in english, I supposed are mark, perhaps bookmarks, parts of the index, epigraph, I don't know the name in english.

My idea is put this script.vbs as a link in other program. So I can go from a program to a certain part of my word document.

With your code I have put in the word visual editor this code :

Sub findedit32 ()
Dim sMark As String
sMark = InputBox("Term to find")
With Selection
.HomeKey wdStory
Do While .Find.Execute(sMark) = True
.Range.Characters(1).Select
Exit Do
Loop
End With
endsub

and works fine, but it's not my intention.

I am not a programmer. Perhaps in many years using word 2002 I need now something more specific.

It's difficult for me because probably i will forget anything about it when I get it.

I would like a link of similar code as a repository.

It's not strange touch many doors when everybody assumes that I have a great knowledge about programming. I know nothing.

I am a lucky man with excel 2002 and my new links in word or other external program (not in office) that opens Excel book by a prefixed sheet in it and a prefixed cell.

And will be very happy going to a word document to a certain page, bookmark, string, part of the document map, etc. I have previosly indicated manually in the script. And the script automatically open the word document by the part indicated.

Best Regards
  #7   Report Post  
Esgrimidor Esgrimidor is offline
Junior Member
 
Posts: 8
Default

Quote:
Originally Posted by Graham Mayor View Post
Please do not post the same questions in multiple groups

Dim sMark As String
sMark = InputBox("Term to find")
With Selection
.HomeKey wdStory
Do While .Find.Execute(sMark) = True
.Range.Characters(1).Select
Exit Do
Loop
End With

will select the first character of the requested term

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Esgrimidor wrote:
This is my first post. Best Regards everybody.


a VB script for enter in word to a part of the document

(a prefixed page, a mark, a table, a jpg, a comment ? , the first
occurrence of a character string, a epigraph....... )

I would like enter in a word document looking for a text string and
position the cursor in the string.
I will know the existence of this chain always, so any other mark or
signal would be enough.
All I need is enter in a certain part of a document identified
previously.

Thanksxxx
I see the script to propose a box from the interior of word to find a text. I would like the text prefixed and find the text executing a document word from the exterior.

Thanks
Excuse my language. I'm from Canary Islands
  #8   Report Post  
Esgrimidor Esgrimidor is offline
Junior Member
 
Posts: 8
Default

In a bat with the line :

"M:\Archivos de programa\Microsoft Office\Office10\WINWORD.EXE" /t "Y:\GABINETE\PROYECTOS\125.09\125.09.Proyecto. doc" /mmacro3

mmacro3 is a macro to go to a bookmark in the desired and expressed word document.

This bat may be linked from an excel cell or other possible hyperlinks.

I would like to know how are the methods or systems to go anywhere inside a word document : part of the TOC, epigraph, etc.

Can you indicate me a good link to see the scripts tha make possible to find and go everywhere in a word document ?

Thanskkkxxxx
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to link part of TOC to part of body in document KAK Microsoft Word Help 1 May 30th 09 02:53 AM
can you enter data in part of a word doc and update other areas? isc1jap Microsoft Word Help 2 August 19th 07 06:02 AM
E-mail part of a Word document to someone (not the entire document Beach Lover Microsoft Word Help 2 October 30th 06 02:04 PM
print preview of my word document shows only part of document why Heather Microsoft Word Help 1 October 5th 06 11:38 AM
Enter a prompt, have it enter my answer in the document Zach Mailmerge 1 January 15th 05 10:51 AM


All times are GMT +1. The time now is 03:44 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"