Apology
I apologize for posting the same question w/ 2 headers, when I first looked
at the ng I couldn't quickly tell how heavy the traffic was and I didn't
want my question to get lost :)
Thanks to all,
SGC Tag: Word and Excel Working Together Tag: 45032
Word paging vs. page position
Hello, please help if possible
In Word (XP) you can have a document, say with 5 pages, and in this case the page "name" for page 4 would be "Page4". But, if you then set the document to begin paging at page 3, now the page "name" for page 4 would become "Page7"
â?? How can one differentiate between these two items and keep them straight in VBA code? (i.e. my program doesn't know that any given document is set to start at something other than one - or do I need to test for this everytime? - if so how do you retrieve this setting?
â?? Is there a way to specify the third page and mean the page in the third position rather than the page named "Page3" ? Or do I need to retrieve the beginning page number and add that to my named pages to obtain the correct reference
Any advice, assistance, and especially code examples would be greatly appreciated. TIA Tag: Word and Excel Working Together Tag: 45028
Word document does not obey "GoTo" command
Hello, please help if you are able. I am using VBA in Excel XP with Windows 2K to automate Word XP
I have a program that automates several Word documents from Excel. They all work fine, except one Word document. My code opens the Word document and then it is supposed to activate a specific page. The problem is, the document always stays on page one no matter which page the program tries to activate
I can not find any formatting in the problem document that is any different from any of the other documents I'm automating successfully. It consists of 3 pages in one section with paging beginning at 3. I even tried putting in hard page breaks, but it still refuses to activate any page other than page 1. Can someone think of a reason why this problem would occur
FYI, my code follows if you need it
'*****************************************
Dim strFileName As Strin
Dim wrdApp As Word.Applicatio
'Create an object reference to the running instance of Wor
Set wrdApp = CreateObject("Word.Application"
'Open the file read onl
wrdApp.Application.Documents.Open
strFullSourceFileName,
False,
True,
False,
"",
"",
Fals
'Ensure opened file is visible and activate i
wrdApp.Visible = Tru
wrdApp.Activat
'Go to the page desire
wrdApp.Selection.Goto What:=wdGoToPage, Name:=intSourcePage '< my variable that should activate page
**************************************
TIA for your assistance Tag: Word and Excel Working Together Tag: 45022
Return value from VB EXE
I am calling a VB exe from another applciation, the EXE opens a word document and then do some formatting job. I need to have a return from the EXE, eg. return 1 shows successful, 0 shows failure to do the formatting. Someone says using : Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long), Call ExitProcess(1)
But it's still not working for me, always return 0. Any comments will be much appreciated
-CID Tag: Word and Excel Working Together Tag: 45020
Saving document by page number
Is there a way to save each individual pages in a document
as a separate file with out copy and pasting them on to a
new document? Tag: Word and Excel Working Together Tag: 45015
Need Help -- Tracking changes in a document
I have a very long document that has been edited by 6
people. I need to track all of their changes in one
document and I can't figure out how to set this up. Can
someone help? Tag: Word and Excel Working Together Tag: 45014
Copying value to last empty row
How would i copy a value to the next avaliable cell in
sheet(Error handle)and then loop and copy that value to
the next cell underneath that one. Tag: Word and Excel Working Together Tag: 45013
AutoOpen macro won't run
I have an Access database with links to Word Documents.
When you double-click a document, it opens in Word and I
plan to have a macro execute when the document opens.
I've named the macro AutoOpen and included it
in "Normal.dot" - but it doesn't run. I know it is
supposed to run if the file is opened via "File - Open"
or you open it as one of your "recent documents". Is
there any way to execute the AutoOpen when the file is
activated automatically from an Access form?
Thanks for the help.
Mark Tag: Word and Excel Working Together Tag: 45009
Cell format in excel
Hi all.
I wrote a VB program that gather duration of some process and stores it in
an Excel report.
The duration should be presented as hours:minutes:seconds
Hours might be >24 (e.g. 30:12:03)
The number is not presented right on the sheet instead of the sample above
the cell contains a fraction (e.g. 0.12345)
I tried .numberformat ="@" but it did not help
What other number formats exists ?
Please advise
Guy Tag: Word and Excel Working Together Tag: 45008
Visual Indicator that macro is running?
I would like for a user of one of my forms be able to have some
indication that a macro is or is not running. There is a custom
toolbar that has the macro button on it. Any way to make the
button's appearance change when the macro runs. Or any other
ideas of how a user can quickly ascertain the status of a macro?
TIA - Steve Tag: Word and Excel Working Together Tag: 45006
Document creation, where to start
Hi,
I know very little about programming macro's and VBA in Microsoft Office
2000/XP. But I'm pretty good at programming VB6/VB.NET, ASP/ASP.NET and
other non-Microsoft programming languages.
This is what I want. I need a custom toolbar that start a pop-up asking the
type of template to use (with or without logo, header, footer), build
pre-defined tables (depending on the type of template) and ask for address
information (preferable dynamic from a database, only one address at the
time).
Please advise where to start. Books and links are really appreciated.
Samples are not necessary, I'll try to find out myself (but if you have
samples, they're very welcome too).
Thanks for your time.
Jeroen
- Tag: Word and Excel Working Together Tag: 45005
Splitting a Document
Hi
The supplier reference will be a 6 digit number starting
with a 1. Let me know if you need any more info.
E
>-----Original Message-----
>Edgar,
>
>Give us some more information about how the supplier
reference can be
>identified.
>
>--
>Please post any further questions or followup to the
newsgroups for the
>benefit of others who may be interested. Unsolicited
questions forwarded
>directly to me will only be answered on a paid consulting
basis.
>Hope this helps
>Doug Robbins - Word MVP
>"Edgar" <anonymous@discussions.microsoft.com> wrote in
message
>news:455901c3e3fd$f54ed080$a401280a@phx.gbl...
>> Hi
>>
>> Not sure if this is possible but i have a large document
>> that is generated from Crystal Reports and is saved in
rtf
>> format.
>>
>> This report is lots of different remittances for
suppliers
>> but we cannot split this up to individual suppliers from
>> Crystal so at the moment we are forced to email page
>> ranges which is very time consuming.
>>
>> The problem is the remittances range from 1 page to 15
>> pages so i would need to set up some kind of loop to
check
>> the supplier reference and then for it to save as the
>> supplier reference.
>>
>> The supplier reference is always in the same place on
the
>> document so is it possible to set a marker on this to be
>> used in a loop. Sorry but i know next to nothing about
>> word vba. Thanks in advance for your help.
>>
>> Edgar
>
> Tag: Word and Excel Working Together Tag: 45003
Compile error
Error screen reads:
Microsoft Visual Basic
Compile error in hidden module: main
How do you fix this? Tag: Word and Excel Working Together Tag: 45000
Search Replace with Wildcard
I need to take each instance of
^pTEXTLEADER varyingtext </P>^p<P>
and replace it with
^pTEXTLEADER varyingtext ^p
I can't simply find and replace
</P>^p<P>
with
^p
because
</P>^p<P>
occurs in many places in my file and I want to keep it in those other
places; I already tried this and it returns too many errors on my final
file.
I've looked at "LCase", "Left", "LTrim", "Trim", "Mid", "RCase", "Right",
and "RTrim"; none of these does what I need to do.
Help is greatly appreciated!!
SGC Tag: Word and Excel Working Together Tag: 44999
Wildcard Search Replace
I need to take each instance of
^pTEXTLEADER varyingtext </P>^p<P>
and replace it with
^pTEXTLEADER varyingtext ^p
I can't simply find and replace
</P>^p<P>
with
^p
because
</P>^p<P>
occurs in many places in my file and I want to keep it in those other
places; I already tried this and it returns too many errors on my final
file.
I've looked at "LCase", "Left", "LTrim", "Trim", "Mid", "RCase", "Right",
and "RTrim"; none of these does what I need to do.
Help is greatly appreciated!!
SGC Tag: Word and Excel Working Together Tag: 44998
Splitting a document
Hi
Not sure if this is possible but i have a large document
that is generated from Crystal Reports and is saved in rtf
format.
This report is lots of different remittances for suppliers
but we cannot split this up to individual suppliers from
Crystal so at the moment we are forced to email page
ranges which is very time consuming.
The problem is the remittances range from 1 page to 15
pages so i would need to set up some kind of loop to check
the supplier reference and then for it to save as the
supplier reference.
The supplier reference is always in the same place on the
document so is it possible to set a marker on this to be
used in a loop. Sorry but i know next to nothing about
word vba. Thanks in advance for your help.
Edgar Tag: Word and Excel Working Together Tag: 44994
Arrays and ListBox help
Hello folks (& Doug + Jonathon)
I have a form that prompts a user for personal information such as name and
address.
When completed the user hits the "ADD" button and the personal information
is store in a listbox (listbox2) that has 9 columns. (One column for each of
FirstName/Surname/Street/City etc....)
The listbox typically contains only a few people, and hence only a few rows
(one row per person).
The personal information is also store in an array.
Because Redim Preserve only works on the last element of an array the array
is transposed allowing the additon and deletion of records.
I need to code a DELETE button to delete records from the listbox2 and
subsequently the array.
Deleting records from the listbox2 is easy - the array is not so easy.
I have got my attempt at the code below but it comes up with a type mismatch
on the line;
OffenderArray = ListBox2.Column()
Anybody able to tell me how to finish this off? I think Doug Robbins sent me
the code to do it once but I lost it and cant find the post.
Cheers
-Al
Private Sub CommandButton2_Click()
' Macro to delete Defendants from Array
Dim NameCount
Dim NametoDelete
Dim Adjust_Array_Count
Dim i As Long
NameCount = ListBox2.ListCount ' Counts Number of Defendants
NametoDelete = ListBox2.ListIndex ' Identify currently select Defendant
' Procedure if no name selected
If NametoDelete = -1 Then
MsgBox "You must select a Defendant Name.", vbExclamation, "No Name
Selected"
Exit Sub
End If
' Procedure when name selected
ListBox2.RemoveItem NametoDelete 'Delete selected Defendant from Listbox
ReDim Preserve OffenderArray(9, ListBox2.ListCount - 1) 'Redefine Array
For i = 0 To ListBox2.ListCount - 1
MsgBox OffenderArray(0, i)
Next i
MsgBox "Stop", vbInformation, "Stop"
OffenderArray = ListBox2.Column()
For i = 0 To ListBox2.ListCount - 1
MsgBox OffenderArray(0, i)
Next i
MsgBox "Stop", vbInformation, "Stop" Tag: Word and Excel Working Together Tag: 44991
Chr(10) does not produce linefeed in formfield
Using Office XP I am populating formfields on a Word
template from a query in Access. Everything works fine,
but when I attempt to do a line-feed, all I get is a
little box. I have tried both Chr(10) and Chr(13) for
line feed and carriage return. Other Chr codes work. Chr
(36) produces a dollar sign, etc.
How can I do a line feed in a formfield with code?
Thanks in advance.
Steve Tag: Word and Excel Working Together Tag: 44990
Agents Code in Word
Hello. I am creating a word index of all my agents.
(I am using word because that's the only way I know to get to the Visual
Basic editor)
There is something (s) fundamentally wrong with this code but I can't
figure out what it is:
Here it is:
Private Sub Form_Load()
On Error Resume Next
Set AgentControl = CreateObject("Agent.Control.2")
AgentControl.Connected = True
Dim FSO As FileSystemObject: Set FSO =
CreateObject("Scripting.FileSystemObject")
Dim FOL, FILE: Set FOL = FSO.GetFolder("c:\Windows\msagent\chars").Files
Dim CharacterName As String
For Each FILE In FOL
CharacterName = Left(FILE.Path, Len(FILE.Path) - 4)
AgentControl.Characters.Load CharacterName, CharacterName & ".acs"
AgentControl.Characters.Character(CharacterName).MoveTo 0, 150
AgentControl.Characters.Character(CharacterName).Show
AgentControl.Characters.Character(CharacterName).Play ("Wave")
AgentControl.Characters.Character(CharacterName).Speak "My name is"
& CharacterName
For iCount = 1 To 300000000: Next iCount
Next
End Sub
What it should do
a) Have the first agent come up
b) He waves
c) He says his name
d) Then he stands there waving
e) The next character comes up little below the first
f) Waves and says his name
g) Now there are 2 characters waving.
h) On to the next character
i) At the end all the characters should be standing there waving. (I
tried to make them go ACROSS the page or in neat rows and columns all waving
with their name displayed, but I couldn't figure how to do that, so now the
characters just go down the page.)
2) What it does now:
a) After a loooooong time delay
b) The first agent comes up
c) He waves
d) He spells..yes spells...the full path of his name instead of
reading just his name.
e) Then the next character comes up on top of the first character
and repeats the process.
f) All the characters come up on top of each other
g) Then they all disappear!!
Any ideas on this one??
Thanks!
Stacy Tag: Word and Excel Working Together Tag: 44988
Agents Code in Word
Hello. I am creating a word index of all my agents.
(I am using word because that's the only way I know to get to the Visual
Basic editor)
There is something (s) fundamentally wrong with this code but I can't
figure out what it is:
Here it is:
Private Sub Form_Load()
On Error Resume Next
Set AgentControl = CreateObject("Agent.Control.2")
AgentControl.Connected = True
Dim FSO As FileSystemObject: Set FSO =
CreateObject("Scripting.FileSystemObject")
Dim FOL, FILE: Set FOL = FSO.GetFolder("c:\Windows\msagent\chars").Files
Dim CharacterName As String
For Each FILE In FOL
CharacterName = Left(FILE.Path, Len(FILE.Path) - 4)
AgentControl.Characters.Load CharacterName, CharacterName & ".acs"
AgentControl.Characters.Character(CharacterName).MoveTo 0, 150
AgentControl.Characters.Character(CharacterName).Show
AgentControl.Characters.Character(CharacterName).Play ("Wave")
AgentControl.Characters.Character(CharacterName).Speak "My name is"
& CharacterName
For iCount = 1 To 300000000: Next iCount
Next
End Sub
What it should do
a) Have the first agent come up
b) He waves
c) He says his name
d) Then he stands there waving
e) The next character comes up little below the first
f) Waves and says his name
g) Now there are 2 characters waving.
h) On to the next character
i) At the end all the characters should be standing there waving. (I
tried to make them go ACROSS the page or in neat rows and columns all waving
with their name displayed, but I couldn't figure how to do that, so now the
characters just go down the page.)
2) What it does now:
a) After a loooooong time delay
b) The first agent comes up
c) He waves
d) He spells..yes spells...the full path of his name instead of
reading just his name.
e) Then the next character comes up on top of the first character
and repeats the process.
f) All the characters come up on top of each other
g) Then they all disappear!!
Any ideas on this one??
Thanks!
Stacy Tag: Word and Excel Working Together Tag: 44987
Can't insert Common Dialog Control
This should be simple for someone!!
I am in MS Word 2000 trying to insert an ActiveX control
called Common Dialog Control V6. I see the control in the
list, but when I click on it it says "The server application,
source file, or item cannot be found".
Any help?? Tag: Word and Excel Working Together Tag: 44983
Displaying a FileOpen dialog in desired sort order
I want to be able to select the sort order of a dialog via VBA. Displaying the
directory is easy, but I am stuck with the default (seems to be last used) sort
order. There doesn't appear to be a sort order option in the various VBA
commands that control file opening. How can I automatically display the dialog
let's say in name or date (most recent on top) order without having to click
the name or size or date column once the dialog displays.
===========
With Dialogs(wdDialogFileOpen)
.name = "*.doc"
.SORTBY ="date" or "name" or "size" <-something like this doesn't seem to
exist
.Show
End With
============
Maybe there is a SendKeys command?
Thanks,
Roy Tag: Word and Excel Working Together Tag: 44972
Determining whether a range is inside a field
Version: Word 2000 SR-1
I have some text that I need to use within an If field. The text may
contain double quotes, and may also contain other fields.
Because the If field treats a double quote as delimiting an argument, I want
to replace any double quotes with a Symbol field representing the quote.
However, if a double quote is within a field, I want to leave it unchanged.
I can do the first part like this:
Private Sub Replace_Quotes(sel as Word.Selection)
While Find_Text(sel, """")
sel.Fields.Add sel.Range, wdFieldSymbol, "34", False
Wend
End Sub
Private Function Find_Text(sel As Word.Selection, search_text As String)
With sel.Find
.ClearAllFuzzyOptions
.ClearFormatting
.Forward = True
.MatchWholeWord = False
.MatchWildcards = False
.Text = search_text
.Wrap = wdFindStop
Find_Text = .Execute
End With
End Function
This works, but that if my selection contains a field like this:
{ TIME \@ "dd MMMM yyyy" }
the quotes inside the field also get replaced with the Symbol field.
So, is there any way to determine whether sel.Range relates to something
that's inside a field?
If there isn't, I suppose I could do it by recording each field's definition
before I start, and then restoring each field to it's original state. Is
there a better way?
Thanks.
Andy Bowles Tag: Word and Excel Working Together Tag: 44967
Replacing MS Notepad
WHEN I DOWNLOAD A FORM OR APPLICATION I CLICK ON THE FILE
TAB BESIDE THE EDIT ON THERE IT SAYS NEW, OPEN, EDIT WITH
NOTEPAD AND SAVE AS. I CLICK ON SAY AS AND DOWNLOAD IT.
BUT WHEN I'M OFF LINE TO WORK ON IT I ONLY CAN WORK ON IT
IN NOTE PAD FORM WITHOUT THE HTML. WHEN I TRY TO OPEN IT
IN MY MICROSOFT WORD PROCESSOR. I GET THAT IT CAN'T BE
DONE CAUSE I DON'T HAVE A CONVERTER TO SUPPORT IT. I HAVE
WINDOWS ME, WITH MICROSOFT WORKS 6.0.. NOW ON MY FRIENDS
PC I CAN DOWN LOAD THE SOMETHING THE SAME WAY AND I CAN
EDIT IT WITH HIS MICROSOFT WORD PROCESSOR. THE ONLY THING
I SAW DIFFERENT WAS IF YOU CLICK ON HIS FILE ON TOP BESIDE
EDIT HIS SAYS NEW, OPEN, EDIT WITH MICROSOFT WORD
PROCESSOR...AND MINE SAYS EDIT WITH NOTEPAD...MY QUESTION
IS HOW DO I CHANGE MINE TO EDIT WITH MICROSOFT WORD
PROCESSOR...........PLEASE HELP ME PLEASE........THANKS
JOHN Tag: Word and Excel Working Together Tag: 44964
Please review code
I am using a template with fixed cell dimensions.
I am taking information from a vb.net form and using bookmarks a
placeholders for the form data.
I am not using fixed-width fonts.
If the data wraps in the cell due to length - I need to move all tex
from the 2nd line forward to the next cell.
The following code now works - but I would like any tips or comments o
code to make it more efficient.
Thanks in advance.
Matt
Private Sub cmdGenerate_Click(ByVal sender As System.Object, ByVa
e As System.EventArgs) Handles cmdGenerate.Click
' Declare the variables
Dim m_WordServer As Word.ApplicationClass
m_WordServer = New Word.Application()
Dim word_filename As String
Dim wdGoToBookmark As Word.Bookmark
Dim myrange As Word.Range
Dim oTable As Word.Table
Dim oCell As Word.Cell
Dim lngBegRange As Long
Dim lngEndRange As Long
'Get the discharge template path
word_filename = GetRegValue("Software\\Documentation"
"DischargeTemplatePath")
Try
With m_WordServer
' Open and acitvate the document Tag: Word and Excel Working Together Tag: 44962
Insert Text Box
What is the best way to bring the cursor to the last page of a document and
insert a text box? I've tried several pieces of code, but I keep running
into buggy issues.
Thank you,
Doug Tag: Word and Excel Working Together Tag: 44957
Insert text from UserForm into current cursor position
I've done my Usenet homework on this, but still can't find the proper
syntax for this:
I have a UserForm open, with some text stored in the "txtInsert" field
in the form.
What is the syntax to attach to a command button on the form to insert
the value of txtInsert into the document at the current cursor
position?
TIA Tag: Word and Excel Working Together Tag: 44953
Mouse Wheel
Am I the only one who has noticed that the mouse wheel does not work in VBA?
It is impossible to scroll using the wheel when programming....
Knut Tag: Word and Excel Working Together Tag: 44947
Entering Text into a Text Field
I am trying to insert a text field which will allow for enough space when entering the text. The problem is that once I have made the form, when text is typed into the field by a user, the text following the field moves. I want the field to provide enough space in the form without having the following text move. Is this possible? Is there a way to "freeze" the text on the form? Tag: Word and Excel Working Together Tag: 44946
Modify text between certain tags
Hi all!
How to modify (i.e. toggle bold) all the strings in document which are
between certain tags? Strings are like: ##THIS_IS_A_STRING##
Spaces between tags "##" are not allowed. So, all the occurences in the
Word document should be modified, how could this be done? Tag: Word and Excel Working Together Tag: 44945
API for Custom Document Properties & Comments
Hello
I am trying to export information such as custom document properties and comments from a Word 2000 document to another application written in php. I understand vba very well but I am at a loss as to how to do this
Thanx for the help
Rami Tag: Word and Excel Working Together Tag: 44944
can't capture Edit>Links... in word macro
I am trying to create a macro that will break all existing OLE links in a MS Word 2002 document
The master document containes a series of OLE links to text (paragraphs) in other documents. I want to break the links in the master doc so it is only static text. When I record amacro - all document oiperations are captured in teh macro except the Edit>Links... dialog is not captured
I have tried using the following code with no success (perhaps shapes are not word documents?
Dim shapeLoop As Shap
For Each shapeLoop In ActiveDocument.Shape
With shapeLoo
If .Type = msoLinkedOLEObject The
.LinkFormat.Updat
.LinkFormat.BreakLin
End I
End Wit
Next shapeLoo
Any ideas on how to craete this generic macro
Thanks
Mark McFarlane Tag: Word and Excel Working Together Tag: 44937
run-time error '5941' after merging
Hi,
I'm working on an Word offertemplate, after lots of hardworking, it's
finished! But now there's a big problem, If the template is merged with
our CRM software (called Winris, a dutch company) The macro's won't
work anymore. If you use the template manualy all the macro's work
fine, but after merging (and even saving in the same directory as the
Template)you'll get the next error message:
Run-time error '5941'
The requested member of the collection does not exist.
ONly the index-macro still works fine (not connected to any external
file).
In the template I've used macro's like:
Sub AMwest()
'
' AMwest Macro
' Macro opgenomen op 31-10-03 door Receptie
'
ChangeFileOpenDirectory _
"F:\data\Public\Offerte documenten\Gegevens Accountmanager\"
ActiveDocument.Bookmarks("ButtonAM").Select
Selection.InsertFile FileName:="amwest.doc", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Sub
I'm using word2000 and VB6, we use the crm-sw to merge the customername
and adress with the offer (one at a time). And then select severel
options (by non-working macros at the moment.
I hope someone can help me with this problem since we're dealing with
it for several months by now!
Thanx in Advance
B Meijer from the Netherlands
p.s. I just found out it's caused by the bookmarks wich are gone after
merging!:confused: Any idea anybody?
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/ Tag: Word and Excel Working Together Tag: 44928
Defining Range Objects Using Bookmarks
Word 2000
I have a document that is used as a boiler plate for text. Throughout the
course of a shift we will paste blocks of data into the document. At the
end of the shift we process the data using a set a macros that I've written.
Currently, the macros work by moving the cursor in the document to select
blocks of text. I'm now working on having the macros use range objects
instead. The blocks of text can be of varying lengths, so I can't use a set
number of characters, lines, or paragraphs to create the range objects--they
have to be dynamic in that respect. So I thought that I would use
bookmarks. I've figured out how to create a bookmark each time a block of
text is pasted into the document. I'm creating the bookmark at the end of
the block of text. However, I haven't been able to figure out how to use
those bookmarks to define my range objects.
What I would like to do is have the macro define the range object so that it
starts with the current cursor location and ends with the NEXT bookmark.
How can I do that?
--Tom Tag: Word and Excel Working Together Tag: 44927
help with macro
I have a document with multiple tables (separated). What I would like to do is create a macro that selects a certain table and then pulls out only the rows that have text in the second column and puts these rows at the bottom of the document as a new page. The table has four columns. First column has a few lines of text describing an action that has to be taken (this is a "minutes" document). The second column will have a name of the person that is responsible for the action (Last name, first name). The third column would have a due date. So really what I want is to pull out just the action items, which would be the rows with a person's name in the second column, and list them on a separate page at the bottom of the document. Also would like it to be sorted by ascending alpha order by person's name. I have done macros using tools - macros and recording the macro while performing certain steps. I believe I would have to use VB code and I am not real familiar with that. I hope this makes sense.
Just another thought. Would it make more sense to create fields using table of contents fields? This way if I update the body of the document it would also update the summary page at the end of the document. Thank you for any help you can give.
Dorothy Tag: Word and Excel Working Together Tag: 44921
Multiuser access to a file on our server
We are using a number of "boiler plate" type text entries that get
inserted into documents by a function "fnInsertText" that's in the
Normal template on each workstation. The text entries are arguements
passed to fnInsertText, which performs certain operations on them and
then inserts them into the document. There are about 100 text
entries of one-sentence size. They are subject to continual
Add/Change/Delete operations.
I'd like some ideas on how and where to store these text entries on
our network so that they are available to all the workstations, and
can be maintained by editing a single file on the server. I thought
about retrieving them from the server as a tab-delimited text file and
putting them into an array in the workstation module that contains
"fnInsertText" ... something like that, but there are probably better
ways ...
I assume that accessing them directly from a file on the server would
create a great many problems related to sharing, network speed, etc.
Thanks very much Tag: Word and Excel Working Together Tag: 44911
How to create custom template that will replace standard bullets?
Hello
I have a ton of word 2000 documents that i would like to modify so that I can put them into my FlexWiki web site. What that entails is modifying all of my headers from Heading1, Heading2 etc...to something that wiki can understand like
Heading1 would be
Heading2 would be !
Heading3 would be !!
The theory was that I could create a custom style sheet .dot and then apply it to my existing documents! And whola! I can cut and paste my documents into Wiki. Tag: Word and Excel Working Together Tag: 44909
Match Whole Word
In a macro, I used Ctrl+Find to locate the word "East" in an addr line
and change it to "E". While this works fine, it also changes
"Eastwood" to "Ewood". I tried using MatchWholeWord=True but it didn't
help.
I notice that when I use Ctrl+Find outside of the macro environment,
it allows me to choose "Find Whole Words Only'.
My question is how do I make the macro using Ctrl+Find to use the
"Find Whole Words Only" command.
Thanks muchly for your time and expertise
Joanne Tag: Word and Excel Working Together Tag: 44904
Visual Basic Error
When I start Word2000, I get a Microsoft Visual Basic
Window that claims a runtime error '48' It says that a
file was not found (QStartup.dll)
This started appearing after I uninstalled a number of
programs. Any idea what is causing this and how I can
get rid of it? Tag: Word and Excel Working Together Tag: 44901
Forms and Documents
I'm stumped! I'm trying to design a document template
that allows the user to put information into a pop-up form
ONCE, so that it can be placed at several locations
throughout the document. Tag: Word and Excel Working Together Tag: 44900
Updating Macro in footer
I have a macro set up that updates the document version, this is also displayed in the footer of the document but when the macro is run it doesn't automatically update the version number and I have to manually update the field. How do I change this so all the version number instances update when the macro is run? Tag: Word and Excel Working Together Tag: 44895
Connection String Problem
The code below works on, say, 99 out of 100 machines, regardless of
the version of Word.
I suspect a DLL is missing on the target machine, or a flaw in my
code. We are not allowed to distribute DLL files or in any other way
change a user's machine.
The code below opens a text file (SBAOffices.txt) and parses through
to populate a combobox.
Dir checks to see if the file exists. It does. strDB is the Temp or
Templates directory.
The code fails on rs.Open. Record count is 0.
Any ideas or comments to help with the thought process would be
appreciated.
Thanks!
Dan
==========================
Count = 0
If Dir(strDestination, vbNormal) <> "" Then
'Get count of records in file
If strDB = "" Then
strDB = ActiveDocument.AttachedTemplate.Path
End If
Set rs = CreateObject("ador.recordset")
strConnect = _
"Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
"DefaultDir=" & strDB & ";" & Chr(34)
rs.Open "Select * from " & strTable & " order by ST, Name",
strConnect, adOpenStatic
Count = rs.RecordCount
If Count = 0 Then
GoTo ErrorOfficesList
End If
ReDim OfficeList(Count, 7)
'14 columns in SBAOffices.txt
' Access and read Text file
Do Until rs.EOF
For Each fld In rs.Fields
If fld = Empty Then
Else
...
========================== Tag: Word and Excel Working Together Tag: 44893
InsertAdres-command / choise af the standard addressbook
When I use the word-command "InsertAddress" , I have to choose each time in
a list from wich Outlook-Addressbook of our Company I want to pick the
address from
The settings made in OUTLOOK itself (like "show this addresslist first
..." ) seems not influencing the Word-command
The question is if there is a way to declare that the (public) address book
of our Division becomes the standard addressbook in Word
Thanks in advance,
paul
(working with WORD 2000 SR1 and OUTLOOK 2000 SR1) Tag: Word and Excel Working Together Tag: 44883
Adding Item to ComboBox
Hi Friends,
I am working on an application in VB6.0 which creates Word document on the fly.
I have added a ComboBox control to the page, but I am not able to add the individual ListItems to this Combo Box.
I am not getting any run time errors, but when I open the created document it doesn't show me any Item in the ComboBox.
Following is the code I am trying.
Set MyInLineShape = MyTable.Cell(1, 1).Range.InlineShapes.AddOLEControl("Forms.ComboBox.1")
MyInLineShape.OLEFormat.object.Style = 2
MyInLineShape.OLEFormat.object.AddItem "Item 1"
MyInLineShape.OLEFormat.object.AddItem "Item 2"
MyInLineShape.OLEFormat.object.AddItem "Item 3"
MyInLineShape.OLEFormat.object.AddItem "Item 4"
Kindly Help,
Thanks and Regards,
Nik Tag: Word and Excel Working Together Tag: 44881
Screen Updating
Word 2000
I have a set a macros that do a lot of text selections in the document.
When the macros run, all the activity in the document makes the screen
flash. I've been working with Application.ScreenUpdating, and that works
well with some of the macros. However, with other macros it doesn't work as
well. One macro in particular is started with one block of text selected,
and ends with a different block of text selected.
Application.ScreenUpdating = False has little impact on how much the screen
flashes during this macro.
Are there any tips or tricks that can be used to make the screen flash less?
--Tom Tag: Word and Excel Working Together Tag: 44878
Macro to convert hyperlinks to Word97/2000 Format
Hi there
I have about 80 MS Word documents created in Word 2003 that contain hyperlinks to other files within the same directory tree. The hyperlinks work perfectly well on my PC (WinXP and Off2003), but most of the users accessing the documents (and using the hyperlinks to navigate around) are using Windows 95 with Office 97. These users are unable to follow the hyperlinks. The reason is well documented in MS Knowledge Base article 329835 (entitled "Problems with Hyperlinks in Office XP Documents You Open with Earlier Versions of Office"). Now I would like to convert all the forward slashes in the hyperlinks to backslashes, so that users of all versions of Office and Windows can navigate without encountering errors. However, even though I manually edit the hyperlink in Word 2003 and replace the / with \ when saving the document, the path is stored in the new format (i.e. using the forward slash instead of the backslash character). I have also tried Alt-F9 and the Edit/Replace feature, but even this does not work. Does anyone have any idea how I can convert (preferably using a macro) all the hyperlinks so that they work for all versions of Office since Office 97?
Any feedback would be greatly appreciated. Many thanks in advance. Tag: Word and Excel Working Together Tag: 44871
Monitor clipboard......
Hi Folks,
Does anyone know how to monitor the clipboard for data? Lets say for the
sake of an example its a string of format;
xxxxxxxxxxxx (where x = a 10 digit number)
name (where name = a given name)
Cheers
-Al Tag: Word and Excel Working Together Tag: 44870
Equivilent of Application.GetOpenFilename
In Excel I used the following to get the user to browse for a filename (full path)
stfilename = Application.GetOpenFilename _
("Excel Files (*.xls),", 2, "Select File to Paste Path", , False)
In word is there a way to do the same thing? That is get the user to browse for a file and then select it so I can attached that file to an email?
Simon. Tag: Word and Excel Working Together Tag: 44861
Find, then loop with Find Next?
I've got a Selection.Find inside a loop. If Find.Found = True, I've got
five other IFs that the selection must meet before I can take action.
Somewhere in this mess, I've got to say Found = True, but it fails the other
conditions, so go find the next one and check it until Found = False. I'm
having trouble wrapping my brain around this one - any help or examples are
appreciated.
Ed Tag: Word and Excel Working Together Tag: 44854