From Excel, Open a word document and goto a page question
Solved/Closed
Anonymous User
-
Jan 29, 2013 at 06:21 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 1, 2013 at 06:07 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 1, 2013 at 06:07 PM
Related:
- How to convert number to words in excel in tamil
- Convert number to words in excel - Guide
- How to convert number to words in word - Guide
- Convert m3u to mp3 - Guide
- How to take screenshot in excel - Guide
- Convert picture to shape powerpoint - Guide
4 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jan 29, 2013 at 06:58 AM
Jan 29, 2013 at 06:58 AM
this also does not work ?
WordApp.Selection.Goto What:=wdGoToPage, Which:=wdGoToNext, Name:="8"
WordApp.Selection.Goto What:=wdGoToPage, Which:=wdGoToNext, Name:="8"
Anonymous User
Jan 29, 2013 at 07:56 AM
Jan 29, 2013 at 07:56 AM
yes, your right, that doesn't work too. It opens up word and navigates to page 29 (which happens to be section 8)
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jan 29, 2013 at 10:05 PM
Jan 29, 2013 at 10:05 PM
is it possible to sample word document that can be test. If you could post it on some public file share site like speedyshare.com and post back link to the ACTUAL FILE back here
Anonymous User
Jan 30, 2013 at 03:55 AM
Jan 30, 2013 at 03:55 AM
I tried using a working document and it would go to section instead of page.
when I use a blank document with lets say 5 pages, it always went to page 1.
I used several different lines of code and they all went to page 1 on the blank document;
does it work with you?
when I use a blank document with lets say 5 pages, it always went to page 1.
I used several different lines of code and they all went to page 1 on the blank document;
WordApp.Selection.Goto What:=wdGoToPage, Which:=wdGoToNext, Name:="5" WordApp.Selection.Goto What:=wdGoToPage, Count:=5 WordApp.Selection.Goto wdGoToPage, wdGoToNext, , 5
does it work with you?
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Feb 2, 2013 at 02:13 PM
Feb 2, 2013 at 02:13 PM
Ah I see
The issue is this, you are trying to run the code from non- word application. It does not know what these mean "wdGoToPage", "wdGoToNext"
Try this
WordApp.Selection.Goto What:=1, Which:=2, Name:="8"
The issue is this, you are trying to run the code from non- word application. It does not know what these mean "wdGoToPage", "wdGoToNext"
Try this
WordApp.Selection.Goto What:=1, Which:=2, Name:="8"
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Mar 16, 2013 at 11:56 AM
Mar 16, 2013 at 11:56 AM
you are welcome anon.
Anonymous User
May 30, 2013 at 09:18 AM
May 30, 2013 at 09:18 AM
thats great, and it seems to work, however, what do these numbers mean?
What:=1, Which:=2,
What:=1, Which:=2,
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 1, 2013 at 06:07 PM
Jun 1, 2013 at 06:07 PM
from help
Word Developer Reference
Document.GoTo Method
Returns a Range object that represents the start position of the specified item, such as a page, bookmark, or field.
Syntax
expression.GoTo(What, Which, Count, Name)
expression Required. A variable that represents a Document object.
Parameters
Name Required/Optional Data Type Description
What Optional. Variant .
The kind of item to which the range or selection is moved. Can be one of the WdGoToItem constants.
Which . Optional. Variant.
The item to which the range or selection is moved. Can be one of the WdGoToDirection constants.
Count . Optional. Variant.
The number of the item in the document. The default value is 1. Only positive values are valid. To specify an item that precedes the range or selection, use wdGoToPrevious as the Which argument and specify a value for the Count value.
Name Optional. Variant.
If the What argument is wdGoToBookmark, wdGoToComment, wdGoToField, or wdGoToObject, this argument specifies a name. Only positive values are valid. To specify an item that precedes the range or selection, use wdGoToPrevious as the Which argument and specify a value for the Count argument.
Remarks
When you use the GoTo method with the wdGoToGrammaticalError, wdGoToProofreadingError, or wdGoToSpellingError constant, the Range that's returned includes any grammar error text or spelling error text.
Too Much detail to add here. See the help and you will find all you seek
Word Developer Reference
Document.GoTo Method
Returns a Range object that represents the start position of the specified item, such as a page, bookmark, or field.
Syntax
expression.GoTo(What, Which, Count, Name)
expression Required. A variable that represents a Document object.
Parameters
Name Required/Optional Data Type Description
What Optional. Variant .
The kind of item to which the range or selection is moved. Can be one of the WdGoToItem constants.
Which . Optional. Variant.
The item to which the range or selection is moved. Can be one of the WdGoToDirection constants.
Count . Optional. Variant.
The number of the item in the document. The default value is 1. Only positive values are valid. To specify an item that precedes the range or selection, use wdGoToPrevious as the Which argument and specify a value for the Count value.
Name Optional. Variant.
If the What argument is wdGoToBookmark, wdGoToComment, wdGoToField, or wdGoToObject, this argument specifies a name. Only positive values are valid. To specify an item that precedes the range or selection, use wdGoToPrevious as the Which argument and specify a value for the Count argument.
Remarks
When you use the GoTo method with the wdGoToGrammaticalError, wdGoToProofreadingError, or wdGoToSpellingError constant, the Range that's returned includes any grammar error text or spelling error text.
Too Much detail to add here. See the help and you will find all you seek