MS Word will not send the fill color-white-to the printer
I am using a Canon BC2100 inkjet printer, with the BC21e
color Cartridge.
I am printing WordArt on colored paper.
However, I cannot get white to print as a fill in any of
my WordArt.
Whatever color the paper is that's the color that comes up
where white should be.
Can you please help?
Most appreciative,
Wayne Myers Tag: VBA command to break links Tag: 42381
Macro using a Loop
Hi all! I am working on creating a macro to delete
information in a report. I have a header section and
under that I have client information. I need to delete
the first 18 characters of each line for confindentiality
reasons. The number of clients varies per report, so
there is not a constant number of lines. If I only need
to delete one line, I could have the macro find a certain
word in the report, go to the start of the line to be
deleted, select the characters to be deleted, and delete
that section, but I have multiple lines. I want to do a
loop, but I am not sure how I should do this. Does
anyone have any suggestions? Thanks in advance.
Ann Tag: VBA command to break links Tag: 42374
Word 2000 Forms: Button Caption "&" for underscore
I have a button on a Word Form that has a caption "Close". I would like to
place the "&" character before the letter "C" in my button Caption property,
so that the letter "C" is underlined, which will allow the user to press
Alt-C for a shortcut to clicking the button.
Can someone tell me why this will not work in Word? It works fine if I use
Access to create forms. If I try this in Word, the caption of my button is
"&Close".
Am I missing something? Tag: VBA command to break links Tag: 42363
Making files from VBA?
Hey, I want to create a simple .bat file and a txt from a
macro. Is this possible? How can I do it?
-Thanks
Paul Tag: VBA command to break links Tag: 42361
ReDim
Hi.
I have the following code:
Dim stringArray(0) As String
ReDim Preserve stringArray(1)
When I try to run it, I get the following error:
Compile error:
Array already dimensioned
What is the meaning of this? I thought that ReDim is the way to
redimension an array in VBScripting? Does anyone have any thoughts on
this?
Thanks
--
Jan Eliasen, representing himself and not the company he works for. Tag: VBA command to break links Tag: 42360
Word 2000: Sort a Combo Box
Does anyone know how I can sort an unbound combo box using Microsoft Word
and VBA? In my Initialize function of my form, I am using the .AddItem
method to populate my combo box. The user has the ability to add new items
to the combo box. I would like to be able to sort the combo box right after
the user adds a new item to the combo box. Does anyone have any code or
ideas of how I can do this? Would the same apply for a List Box? Because I
will eventually add this functionality later, but the Combo box is 1st
priority.
Thanks. Tag: VBA command to break links Tag: 42358
RTF from Oracle To VB
Hi all,
Is there a way to convert RTF indications to VB/Word
from an oracle SQL-select?
This is the an example of a string returned from oracle:
"{BR2}textgoeshere{BR1}paragraph goes here{BR1}again some
text" etc etc
The oracle guy at my company says this is RTF text.
Does anyone know how to interprete this in VB, so that it
can be sent to word-document, preserving the formatting
of carrige returns etc? Thanks in advance!
Regards, O.B.1. Tag: VBA command to break links Tag: 42354
DocumentProperties and Safe as Webpage
Hello NG,
i save some informations in Word (2000, XP) as
CustomDocumentProperties. I did this for month without any problems, i
store strings and xml-strings this way.
Now there are some new properties, when I save as Webpage (HTML) Word
hangs (2000 and XP). If I delete a property (never mind
which)everything works fine.
My first idea was that there is a limit of customdocumentproperties
(not the 255 char limit for each property). But after some tests -
this is not the problem.
Do you have any experiences in problems saving a Word-Document as HTML
when making extensive use of customdocumentproperties?
Thanks
Alfred Tag: VBA command to break links Tag: 42351
Inserting at end of document
Hi all,
i'm building a document generator using VB6, however
I'm not quite used to the word object model. I was
wondering if anyone can tell me how to insert a page
break at the end of the document (there are several
annexes to be added at the end, each one starting on a
new page).
This is a part of what I've got coded so far:
------------------
Set objWordApp = New Word.Application
objWordApp.Visible = True
Set objWordDoc = objWordApp.Documents.Add
("templatepath", , , True)
For intCount = 0 to objColAnnex.Count - 1
'in a loop, I would add each text from a annex classobject
'followed by a pagebreak, or first a pagebreak and then
followed by the text, whichever is the easiest.
Next intCount
---------------------
Is there anyone who could complete the code above, within
the for-next loop? I've tried to work with the
selectionobject like this:
Set sel = objWordApp.Selection
sel.MoveRight unit:=wdStory, Count:=1
sel.InsertBreak Type:=wdPageBreak
but I keep getting errormessages (bad parameter)
Thanks for your help!
Regards,
O.B.1 Tag: VBA command to break links Tag: 42343
Week ending date calculation
How do I display the date of the next Saturday on any given day. If today is a
Saturday then display todays date.
Thanks in advance
Geoff Tag: VBA command to break links Tag: 42338
How to change an equation
hi folks,
Is there a way to change an equation using VBA in a Word documents. Thanks
in advance. Angel. Tag: VBA command to break links Tag: 42336
Word Macro
I have worked with VBA in Excel, but I haven't in Word.
I have a report that I imported into Word and I need to
remove some words from the top of the report. I can do a
find and delete some of the information, but the other
information varies as I import the report. What is the
best way to only select the text that I need, and delete
the rest. Note: Some of the information that I need
changes everytime I import the report. I also want to
add in a watermark, otherwise, I would import my report
into Excel. Thanks in advance and have a great day!
Julie Tag: VBA command to break links Tag: 42333
Word 2000: Formatting words within a Bookmark
Can anyone tell me if this can be done. With VBA code, I want to add some
text to a bookmark within my document but as I am adding the text to the
bookmark, I'd like to turn on/off Bold, add Underline, add comments, etc...
I am able to do this outside of a bookmark with the Selection method, but
wanted to know if I can do this with a bookmark.
My sample code to format the text of a selection is below, which I would
like to be able to do the same thing for a bookmark:
With Selection
.TypeText Text:="This is my first paragraph"
.TypeParagraph
.TypeText Text:="This is my 2nd paragraph. Now I will "
.Font.Bold = True
.TypeText "BOLD some words. "
.Font.Bold = False
.TypeText Text:="Bold is now turned OFF. Now, add a comment
here"
.Comments.Add Selection.Range, "This is my comment"
.TypeParagraph
.TypeText Text:="This is my 3rd paragraph."
.EndKey unit:=wdLine
End With
Is this possible to do with a bookmark? My code to select the bookmark is:
ActiveDocument.Bookmarks("myBookmark").Select
If I try the same thing using my bookmark, as I did in my above example, the
text gets put after the bookmark, not within the bookmark. And, if I rerun
my code over and over, I get repeating paragraphs, because the bookmark does
not get cleared out, since my sample text is actually in the document, not
within the bookmark. Tag: VBA command to break links Tag: 42329
Insert Cross-Ref to last Caption by VBA?
(This was first posted to Word.Tables, where I asked about numbering tables.
I thought it might be better suited to this group. Sorry about the
double-post.)
Thanks to the heroic efforts of Jay Freedman and Suzanne Barnhill, I now
have half a handle on Captions and Cross-References. I think it will make
things easier - but first I have to implement these in a report already
written. I'm using these for table headers, and there's about 50 or so, so
I was going to put it all in a few quick macros to avoid a lot of repeated
motions.
Everything's okay, except for getting the cross-reference to automatically
choose the last / highest-numbered caption, which would be the one I just
put in. Every time I select Insert Cross-Reference, it gives me a list.
With the macro, I don't want to manually select the Caption - it will always
(for this effort) be the Caption I just inserted.
I couldn't see anything in the Help or VBA Help that would allow me to
specify which Caption to Cross-Reference. The VBA code for
InsertCrossReference has an argument for "ReferenceItem:=", and Help tells
me to use GetCrossReferenceItems, but I can't put it together to get the
last CrossReference inserted.
Any suggestions?
Ed Tag: VBA command to break links Tag: 42328
Macros seperate from doc?
Hello again!
Is there a way to keep a bunch of sets of macros that all
can go with one document and bind them together
programatically as needed? Thanks!
-Paul Tag: VBA command to break links Tag: 42327
Form Field on Unprotected Sheet
I have this wondrous code that I want to run when ff1 is exited. The
trouble is, this sheet is not protected, so the formfield is just deleted.
Is there any similar way to "run" code when text at that location is
entered? (I hope this question is not too unclear.)
TIA Tag: VBA command to break links Tag: 42320
How to select a paragraph via VBA
I want to select a paragraph in my macro
I have this type of line
U:\totttot\toto\t
tu\laposte.xl
At present, I search the extension .xls, then I can select the line. (result : tu\laposte.xls
How can I select the entire paragraph
U:\totttot\toto\t
tu\laposte.xl
Macro use
Selection.MoveRight Unit:=wdCharacter, Count:=
Selection.HomeKey Unit:=wdLine, Extend:=wdExten Tag: VBA command to break links Tag: 42319
Automating Password protection
How do you automate password protection on a Word Document
from Visual Basic? Tag: VBA command to break links Tag: 42314
Find the page number that a section starts on
Hi,
Does anyone know how to find the page number that a
section starts on.
I want to list all the sections within a document and to
display the page number.
Cheers,
Steven Tag: VBA command to break links Tag: 42310
Memory error filling a MS Word document from MS Access
Hi,
I've got a problem with memory using MS Word..
Situation:
MS Office 2000 (fully updated)
Window w2k professional (fully updated)
I have a table on a SQL Server database.
In this table I put complete word documents as objects.
Now, I have a small vb script that copies the word object
and then pastes it in Word.
This works nice, but after a number of items, I get a
message: Not enough memory, If continuing you cannot
undo...
You can continue for a number of items, but after that
Word crashes..
I found a possible fix in the knowledge base concerning
too much edits, but this wasn't it.. I added a save
command, but I still got the problem...
Did anyone else have this problem???
Or maybe a solution??
Bye,
Sander Tag: VBA command to break links Tag: 42308
Macros in IE and locally ?
Hey, I have a confusion. I have this word document that I
want customers to edit through IE with the word viewer
thing and then use a menu item I add to save it back to
the server.
Problem 1: I got how to add a menu item, but when I try to
do it on the opening of the document, it gives me an error
when I call the Add() sub when I open it in IE, but when I
open it with Word through an FTP. How can I get the menu
to be there when the user opens the doc?
Problem 2: When I couldn't get the menu to make itself on
document load so I tried making a "Make Menu" macro
button. I made the button, opened the doc with IE and
double clicked it, nothing happened, then I opened the doc
(a local copy, not thru ftp) with word, and the menus were
there just like the macro ran. Then I opened it again in
IE and the menus were there. I re-traced my steps many
times and it seems like if I run the menu macro either on
my local copy on my C drive in word, or on the remote copy
on a web server, changes show up in both places on the
next time I open the document. Why does this happen?
Any help would be much appreciated, I am stumped. Thanks
-Paul Tag: VBA command to break links Tag: 42304
Testing for Duplex
I'm trying to use the excellent article at
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116
to set up a duplex option on a vba controlled print utility.
It works very well, but what i'd like to know is if there is a way to test
whether the printer supports duplex or not?
The demo function works very well
Sub PrintDuplexBooklet()
Dim iDuplex As Long
iDuplex = GetDuplex 'save the current setting
SetDuplex 3 'set for vertical binding
ActiveDocument.PrintOut Background:=False
SetDuplex iDuplex 'restore the original setting
End SubI was hoping iDuplex = GetDuplex would return 0 if there was no
duplex option, but it doesn't.Can anyone advise? Tag: VBA command to break links Tag: 42296
regional settings' list seperator variable
Hi,
I've run into the following annoying, stupid issue:
Using VBA I want to do a search for 2 or more empty
paragraphs and replace them by one paragraph. Therefore I
use the following code:
With tDoc.Range.Find
.ClearFormatting
.Text = "^13{2,}" <----- problem
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
The line ".text = "^13{2,}"" is giving me problems
however. Because the comma is a list seperator, as defined
in my MS Windows regional settings dialog box (Start,
control panel, regional settings, numbers), it works fine
on my computer.
But a colleague has his list seperator set to ";". Thus,
Word pops up saying it is not a valid expression.
I want my program to work, regardless of the regional
settings. So i tried to find a variable or constant which
contains the list seperator character (be it ",", ";" or
whatever) and create the .text string accordingly; but I
didn't find any.
Any (other) solutions,
thanks
Ward Tag: VBA command to break links Tag: 42287
Finding the section number
Hello
I am new to VBA, and I am writing a Word-macro
I need a way to find the section number the cursor is in.
I found the wdActiveEndSectionNumber, but that seems to always return
"2" in my macro. And I need the full number. If I am in section 2.3.1
then I need a string with "2.3.1" in it. Is this possible?
Thanks in advance
--
Jan Eliasen, representing himself and not the company he works for. Tag: VBA command to break links Tag: 42286
calling functions in a global template
Hi,
How can I call a function in a global template (loaded from the startup
menu) from other document templates?
Any help is appreciated.
Raymond Tag: VBA command to break links Tag: 42284
Template no longer available
I have a document with an attached template. When the document is moved to a
different computer at home the template is in a different path.
The UI (Tools>Templates and AddIns) shows the original template and path.
Clicking Organizer gives the error "This document template does not exist"
so Word is aware of the original template name.
ActiveDocument.AttachedTemplate returns Normal.dot.
Is there a way of getting the orignal template name?
Regards
John Yarrall Tag: VBA command to break links Tag: 42276
Using ftp address in a macro
Hi All,
We are currently trying to do a document comparison by comparing the
active document with a file on an FTP site. When doing manually,
everything works great, but when when I record the action, and attempt
to use the macro, we get Run-time error '5273'. The macro takes the
following form:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 12/2/2003 by NormanJD
'
ActiveDocument.Compare Name:="ftp://1.2.3.4/Compare/test.doc"
End Sub
(IP address changed to protect the guilty)
I have tried variations such as
"ftp://username:password@1.2.3.4/Compare/text.doc" and have added the
FTP site along with username and password to the "Save as" list and in
"My Network Places" I am testing this in an environment with no
firewalls or proxies, (will add those later) but anonymous logins are
disallowed. My workstations will either be running Windows 2000 or
Windows XP with Office 2000 and all latest patches for both the O/S
and Office. I've played like crazy with IE settings, but don't think
this will help as it does wotk when I do everything manually, only the
macro fails...
Has anyone tried this or have a solution? Is this a VB/macro bug?
John Norman Tag: VBA command to break links Tag: 42275
Compile Error
I seem to be getting a VBA error in Office due to some
kind of conflict with my RAV AntiVirus. I can neither
Save nor Save As. The only way to save a file is to close
the window. The error message I get is ...
Microsoft Visual Basic
Compile error in hidden module. Main.
It also comes up every time I open Word or Access or
Excel.
I've tried all the suggestions from the knowledge base,
including upgrading Adobe Acrobat. HELP!
Jim Dodds
jemd@wcvt.com Tag: VBA command to break links Tag: 42272
Unable to delete Auto_close macro
I'm trying to advise a friend who had several viruses on his Windows 2000
machine. All that's left now is a macro in Word 2000 called Auto_Close. At
one point it appeared to be active when saving a document, but now it
doesn't appear to be doing anything. Nevertheless, the Delete option is
greyed out. How can we get rid of this?
We've studied this:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;211800 (What to do
if you have a Macro Virus),
tried starting Word with the Shift key down, and renaming Normal.dot, but
that hasn't helped. Nor is there any sign of it in the Organiser. What's
going on?
--
######################
## PH, London ##
###################### Tag: VBA command to break links Tag: 42267
Saving to an FTP site?
How could I save to an FTP site in VBA possibly using the
SaveAs function (I tried just stuffing an ftp url with a
default username and password in as the filename where the
path should go but it didn't work). Tag: VBA command to break links Tag: 42262
INCLUDETEXT, updating fields within the included text
Here is what I have:
1. document(1) has an INCLUDETEXT that drags in document(2)
2. document(2) has a bookmark
3. the bookmark of document(2) is filled with a number
from an Excel spreadsheet. When you directly open document
(2), Document_Open event goes out and gets the latest
number from the spreadsheet and puts it in the bookmark
But here's the problem:
The bookmark field is NOT updated when document(2)
is "opened" by being dragged into the INCLUDETEXT of
document(1).
I conclude from this that double-click opening a document
is not quite the same as "opening" it with an INCLUDETEXT.
Is there a VBA way to "tell" document(2) it is supposed to
update itself when it is an INCLUDETEXT?
Thank you for any assistance. Tag: VBA command to break links Tag: 42260
"This is not allowed in this context" - xml markup in 03
I have attached well-formed and valid schema to my document and am able to tag most of my text successfully. Why does some of the text that I tag result in an error "This is not allowed in this context". What do I need to do to fix this? Tag: VBA command to break links Tag: 42258
Deleting the Last Section
I'm trying to provide writers with a macro for deleting
the last (portrait) section of a document (in situations
where they decide that they want to end the document with
a landscape section). My users are not very good with
page formatting, so I'm trying to make it as easy as
possible.
I've started with a recorded macro that goes into the
header/footer of the last section, makes them same as
previous, reformats the page to landscape layout, and then
deletes the final section and the previous section break.
The recorded macro is not toggling properly between the
header and footer, and is not working too well... I'm
wondering if anyone has recommendations for reworking the
code.
Here's what I've got so far. I've manually modified the
code in the section marked (*), which is completely
incorrect:
========================================================
Sub DeleteLast()
'
' DeleteLast Macro
' Macro recorded 18.11.2003 by scott.adams
'
'Go to last page and set view
Selection.EndKey Unit:=wdStory
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or
ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
'(*)Reset headers and footers to same as previous
With Section.Headers
HeaderFooter.LinkToPrevious = True
End With
With Section.Footer
HeaderFooter.LinkToPrevious = True
'Return to main document and set last section to
landscape
ActiveWindow.ActivePane.View.SeekView =
wdSeekMainDocument
Application.Browser.Target = wdBrowseSection
Application.Browser.Next
With Selection.PageSetup
.Orientation = wdOrientLandscape
End With
'Delete the last section
With ActiveDocument.Sections.Last.Range
.Delete
End With
'Remove the previous section break
Selection.TypeBackspace
Selection.Delete Unit:=wdCharacter, Count:=1
'Reset browse by object and return to top
Application.Browser.Target = wdBrowsePage
Selection.HomeKey Unit:=wdStory
End Sub
======================================================== Tag: VBA command to break links Tag: 42256
edit existing autotext entries
Using Word XP VBA or VB, how can I programmatically edit
an existing autotext entry in Normal.dot?
i.e we have an entry called Dublin which has our Dublin
office details. Our office details have now changed, so
we want to change the autotext entry in normal.dot to
reflect the new details. The only results I keep on
finding all deal with Selection.Range which we won't have
in this case.
Additionally, is there any way to manipulate/set the
range.text value?
Much appreciated,
Allan Tag: VBA command to break links Tag: 42255
How to copy formfield without onexit macro
Is there a way to copy a formfield without copying the
onexit macro. Currently when I copy the formfield and
paste it somewhere else using VBA it copies the text,
which is what I want, but it also copies the onexit macro,
which I don't want. Anybody know how to do this? Thx. Tag: VBA command to break links Tag: 42254
VBA References
Hi Group
I've just tried to install a set of custom VBA-driven Word document
templates onto another users machine and came across a problem.
I have Word 97, and my user forms and modules reference Microsoft DAO 3.51
Object Library and Microsoft ActiveX Data Objects 2.5 Library. On the
previously untested PC these were not available, and attempting to run my
templates came up with a user-form error in hidden module. So obviously Word
doesn't auto-reference these for me. Is there a way of making my VBA script
do this in an AutoExec so that the error will not occur? Is there another
way around this problem? Any help would be much appreciated.
Best wishes
Peter Kessler
Kessler Associates
E: ka@kessler-web.co.uk
W: www.kessler-web.co.uk Tag: VBA command to break links Tag: 42251
Select a page
Hello again. FYI - I am automating Word from Excel.
I have the following function that is supposed to select a
specific page in a document, it works well, unless the
target page is the LAST page in the document:
Dim wrdApp As Word.Application
Set wrdApp = GetObject(, "Word.Application")
wrdApp.Documents(argFileName).Activate
With wrdApp.Selection
.ExtendMode = False
.GoTo What:=wdGoToPage, Which:=wdGoToNext,
Name:=argPageNumber
.ExtendMode = True
.GoTo What:=wdGoToPage, Which:=wdGoToNext, Count:=1 ',
Name:=""
.ExtendMode = False
End With
Can someone tell me what is wrong or how I can always
concisely select an entire page no matter where it is in
the document? Your example code is most appreciated.
Thanks much in advance. Tag: VBA command to break links Tag: 42245
Reference to Word
Hello. I hope someone can help me.
I am actually working on a project to automate Word from
Excel. I can start a new instance of Word, open files,
etc., but:
1. After the Word App is instantiated, my code does some
processing. Then it switches to Excel. Later, in a new
procedure, how do I re-establish a reference to Word again
(i.e. if the App is already running)?
2. If there is more than one instance running, how can I
determine in VBA which instance is the one my program
started and which is an instance the user started/already
had open?
Please note that my program will always start a new
instance of Word and work with that instance.
Your example code is what I need the most. Thank you very
much for your assistance. Tag: VBA command to break links Tag: 42239
Code to Insert GIF files into a word document...
I have written some code to insert two gif files into a
word document. The code seems to work fine during the
first execution, but as soon as it runs again for the
second time i get error 462: remote server does not exist
or can't be found. It happens on the first AddPicture
statement...anyone have any ideas...thanks in advance.
here is the code:
' create the file path for the first GIF file
lsGIFImage = mid(psSourceFilePath, 1, Len
(psSourceFilePath) - 4) & ".gif"
Set lrWord = New Word.Application
lrWord.DisplayAlerts = wdAlertsNone
' create a new document from a template
Set lrDoc = lrWord.Documents.Add("ROMSWordTemplate1")
If lrDoc Is Nothing Then
lrWord.Quit wdDoNotSaveChanges
Set lrWord = Nothing
CreateOutputReport = False
Exit Function
End If
' insert the GIF's (this is where i get the error the
second time to code runs. it works the first time
thru!
Set lrShape = lrDoc.Shapes.AddPicture(lsGIFImage,
False, True, InchesToPoints(1.5), 1, InchesToPoints(6),
InchesToPoints(3.5))
lrDoc.Shapes.AddPicture mid(lsGIFImage, 1, Len
(lsGIFImage) - 4) & "-b.gif", False, True, 1,
lrShape.Height + 10
Set lrShape = Nothing
' save the new document with this file name...
lrDoc.SaveAs mid(psSourceFilePath, 1, Len
(psSourceFilePath) - 4) & ".doc"
' exit and clean up
Set lrDoc = Nothing
lrWord.Quit wdDoNotSaveChanges
Set lrWord = Nothing Tag: VBA command to break links Tag: 42237
Word macro and Amipro
At work I use Word macros to tidy up specific documents, however my staff only have access to Amipro3.1. How can I convert my Word Macro into an Amipro macro so my staff get the same benefits I do. I have a Word to Amipro converter, but I don't think this will convert the Macro script
Cheers In advanc
Jo Tag: VBA command to break links Tag: 42229
Comparing Documents
Hi,
I have written code to run through every story range and
pull out the revisions. This, unfortunately does not catch
changes to section headers within a storyrange (e.g. the
main story).
The compare documents function provided by word can find
them but if i search through every revision for every
story range i can't.
Any ideas?
Cheers,
Steven Tag: VBA command to break links Tag: 42227
UserForm is not visible
Hi there.
I have a template with the userform frmMain.
On this frmMain I have several buttons that creates and opens new documents
based on different templates.
When I have created a new document, filled it with the desired text and
saved it, I close it.
But when this document is closed, my frmMain is NOT visible. Only the
template containing my frmMain is showing, but the frmMain is not visible.
The reason is probably that I have the code frmMain.Hide in the code that
fills out my new document with text.
But this was neccesary, or else the frmMain was placed in front of my newly
created document.
I had to close the frmMain to get to my newly created document so I could
edit it some and then save/close it.
I don't want to close my frmMain until I'm all finished with all my new
documents.
The frmMain contains a lot of textboxes the the user fills out and all this
text goes into some bookmarks on the different documents.
So I have to have access to my frmMain after closing my newly created
documents.
I have figured out that VBA doesn't support the use of modal and modeless on
the forms.
Is there any other way to switch focus between documents/userforms??
Hope this makes any sense.
Gunnar Tag: VBA command to break links Tag: 42223
More than 3 dimensions in an array?
Hi Folks I've heard this can be done but it's quite difficult. Can anyone
give an example as to how this works?
I'm looking to understand 4 or 5 dimensions (not necesarily to use in code)
mainly to get the concept.
Any pointers appreciated
John Tag: VBA command to break links Tag: 42216
Finding loop conditiion
Im trying to make condition for macro that is searching
for special word through the document. Im not able to make
macro stop searching procedure (it loops as many times as
word is found) and when it reaches the end, it start from
the begining. I want to make stop find procedure when it
reaches the end of document.
Help is appreciated.
Thanks.
Sasa Tag: VBA command to break links Tag: 42215
Java API for MS Word
Is there Java API for MS Word. If not, is there any dll
specification that I can build JNI for. Tag: VBA command to break links Tag: 42211
autoclose/autosave??
I have some code set for closing out of a word doc. The
code itself works fine, but I would like to use it on
either the save/save as or close events. Currently I
have it set up under an "autoclose" module. It works
fine if the user is closing the doc (obviously)...
however, most users will likely try using the "save" menu
option. Here is what I currently have:
Sub autoclose()
'defines variable for filename
Dim strFileNM As String
strFileNM = ActiveDocument.Variables("SOPName").Value
'changes directory default to SOP folder
ChangeFileOpenDirectory _
"C:\Documents and Settings\Owner\My Documents\SOPs\"
'sets filename to value in "SOPName" bookmark & saves as
word doc
'ActiveDocument.SaveAs FileName:=strFileNM,
fileformat:=wdWordDocument
With Dialogs(wdDialogFileSummaryInfo)
.Title = strFileNM
.Execute
End With
End Sub
Thanks! Tag: VBA command to break links Tag: 42206
RichTextbox dead in Word2003
I have a UserForm in Word VBA that is using a RichTextBox. When we try to
deploy this in Word2003, we find that the control is missing. If we try to
insert one, we get the message "The subject is not trusted for the specified
action." OK - what has Microsoft wrought now, and how do we get a
RichtextBox to show up in Word2003? Tag: VBA command to break links Tag: 42204
Section number
Please help if possible.
Can someone supply me with VBA code that will tell me
what document section my blinking cursor is currently in?
Thanks in advance. Tag: VBA command to break links Tag: 42194
Printing on smaller paper
I have been trying to print some party invitations on paper that is 5 1/2" x 8 1/2". I load the paper tray as instructed with the paper to the right side of the tray. Then I change the print preferences to 5 x 8 which is the closest size of my paper. But it still prints as though I'm printing on 8 1/2 x 11. I spent 30 minutes on the phone to the printer manufacturer, and we tried everything there was to try. They say its not the printer. Any ideas? Tag: VBA command to break links Tag: 42190
Programmatically create PostScript files
Hello, please help me if you can.
Does anyone have example code on how to convert Word
files to Acrobat Post Script files using Word XP with
Windows 2000 and Adobe Acrobat 6.0?
Your example code would be most appreciated. Thanks in
advance. Tag: VBA command to break links Tag: 42186
Is there a way using VBA to break links to Excel in a Word
document?