EMAIL SIGNATURE CLAUSE IN WORD
OS is XP Prof with Office 2003. I have a signature clause set up in
outlook as well as one in word under Tools, Options, General, Email
Options. However when I mail from word using either of the icons
"Email" or "Send to Mail Recipient (As Attachment)" it never includes
my email signature from either outlook or from word by default. You
have to click in Outlook "Insert, Signature, etc. How can I force it to
use the signature from either word or outlook by default? Obviously if
I create a message in Outlook my signature comes in by default. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75545
database
Dear ALL,
My name is Gautam and i m new here... i have a specific query regardin
my project.
I want to make a template in word where my product (ie engine) i
selected from the drop down menus and all information pertaining t
that is filled in the lines below.
EG. If i selected engine "A" then its parameters ie bore, stroke
piston speed etc.. should be filled automatically in the templat
below...
I have done this successfully in EXCEL by data validation and VLOOKU
but dont know for WORD.
Please help
Thanks in advance
Gauta
--
gmahendr
-----------------------------------------------------------------------
gmahendru's Profile: http://www.highdots.com/forums/m108
View this thread: http://www.highdots.com/forums/t305111 Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75541
Supress Mail Merge Warning
Every time i open a megre document it issues a warning
"Opening this document will run the following SQL results........."
Anyway to supress this? Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75540
Saving word Pages as images
Hi,
Can anyone suggest me how to save word pages as images.
I need to save each page as an individual image from the word doc through
coding.
Can someone help me with this.
Abhishek Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75538
Inserting jpg's into headers with VBA
Hi
I'm trying to develop a macro in Word to insert a picture (shape
object) in a header. I have no problem inserting lines as inline shapes
using the addline() method and . However when I use AddPicture(), it
always gives me compile errors or runtime type mismatch.
Does anyone have a code snippet that works?
Thanks
Elly Belly Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75529
Mail Merge Update
I have a mail merge document that is linked to an Access database table. A
VBA procedure runs from Access that updates that table thereafter opens the
linked mail merge document. My problem is that when I open the mail merged
document through the Access VBA procedure it does not update the record
in the merged doc but when I open the same document manually, first it
prompts me that it will run a SQL statement from the Access table to merge
that data and when I click OK it shows the new record. (keep in mind that
when the same mail merge document is opened through the VBA procedure it does
not prompt me for
anything instead opens the document with the last existing record).
Is there a way that I can code the Word document to somehow refresh the
merged records on open since it does not do so when I open it through my
procedure?
Any assistance would be greatly appreciated. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75524
Print different pages in the same document to different printers
We have some pages that are colour, and some that are b&w. Rather than print
all pages to a colour printer (ink is more expensive) i would like to be able
to pick some pages to automatically go to a colour printer
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/community/en-us/default.mspx?mid=c487deea-aec7-494e-9f3a-a9e5bfa0f1b8&dg=microsoft.public.word.vba.general Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75523
Find # of Pages in First Section of Document
Hello,
I need to determine the number of pages in the first section of a document
using vba. Anyone know how? Any help is very appreciated, thanks! Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75519
Macro Security Error with Managed Assembly
If fast food were this hard, grocery store shelves would be empty.
Where's a sample or walkthrough on Word documents using managed assemblies
from an HTTP location?
Sure, Word finds the assembly but it still can't resolve security errors:
"The current .Net security policy does not permit SomeDoc.doc to load
custom macros."
I've combed the web for hours but still haven't found the hidden text to
make it work.
Can't it just be simple? Of all of the VSTO samples, how about one that has
a DOC, and assembly, the steps to authorize the download location from an
HTTP, and just work if the user says so.
Thanks for any pointers. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75518
Mail Merge problems with Microsoft CRm quotes
Dear Word experts,
How are you? Normally I spent time in the special Microsoft CRM
(Customer Relationship Management) newsgroup, but the answer to my
question can not be answered...yet. That's when I found this group.
Our problem is the following. We are using the Microsoft CRM software
to manage customer relationships. This piece of software should
'naturally' tie into other MS applications such as Word and Excel.
However....we are facing a big issue when mail merging to Word. The
situation is as follows:
MS CRM allows you to create a quote on which you can put a number of
products (line items). The structure would look something like this:
Product Pieces Price Total Price
Product X 2 50 100
Product Y 4 20 80
Etc
Etc
When the quote is finished, you can start a process which brings all
your products and other quote details(e.g customer address details) to
Word. Now the problem comes up. As an end-user, you seem to haver
little influence in how the items are put into the quote template. They
are just 'dumped' in randomly. We however, would like to group our
products by a unique identifier (in this case: software, hardware and
instruction) and display them in their own little section.
So, ideally:
Software
Product X 2 50 100
Hardware
Product Y 4 20 80
Etc.
I now I am asking a lot, but is it possible (perhaps by putting in 'IF'
statements) to design the template in such a way that it will not put
all products in one table, but group them according to their type and
calculate the subtotals accordingly.
This would really, really help us . Microsoft can not help us at this
time and we are getting lost.
Thanks!!!!!!!!
Michiel Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75516
Change Source of all Links
I have word file (template.doc) that have several links from excel file
(template.xls). Since these files are linked every time a create a new file I
do the following steps:
1.- Open both templates and save them as a new files (sample1.doc and
sample1.xls).
2.- In the sample1.doc file I go to edit/links and click "Change Source" and
change the template.xls file to sample1.xls. Although I click the first file
and then I press
Shift" to select all file and then I click the change source. It is doing it
one by one.
I wonder if there is a way (or program) to make the change source for all
the links in one time?
Could you please help me with some advice?
Thanks in advance.
Maperalia Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75514
Another TOC question
Greetings,
Is it possible for word to create a TOC based on styles that reflect not the
page number but the paragraph number and line number?
i am really strugling with pagination issues. im hoping this might be a
work around.
i hope to hear from anyone on this topic.
thanks Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75510
Package linking and embedding
Hi All
I have an word document and inserted two .txt files using the menu
option Insert->Object->Create from File. For both I checked "Display as
Icon" and for only one checked "Link to File". Now in the document, I
see two "Packaged" objects. I am trying to use C# to distinguish
between the linked and the embedded file but cant do so as all the
properties for the two fields are same. Both are fields with code
"Embed Package". Can anyone help?
Thanking in advance
PJ Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75496
Word Macro Error
I recently inherited a Word document that is giving me the following error
when I first run a customized save macro:
"Word cannot copy a file to itself. G:\.....xxxxxxxxxx"
Now, if I Ok out of that error and rerun the macro, it runs without incident.
What is the probable cause of this error? I'm not too familiar with macro
coding, so I don't know what to really look for.
Any ideas on how to alleviate this error would be greatly appreciated.
Thank you.
BTW, I'm using Word 2003 on W2K.
The error is below:
Sub SODRSave()
'******** _LASODR.DOT "SODRSave" MSWord Macro ********************
'** last rev. 05/23/2003 **
'*****************************************************************
Dim locfolderprefix$
Dim netfolderprefix$
Dim regionprefix$
Dim fileopenpointer$
Dim a$
Dim namefile$
Dim b$
Dim netfolderyear$
Dim netfoldermonth$
Dim netfolder$
Dim button
'****** THESE VARIABLES MUST BE MANUALLY ASSIGNED BY THE USER ******
locfolderprefix$ = "C:\_T&D Operations\Reports\Lancaster" ' C: drive save
path prefix.
netfolderprefix$ = "G:\ENGRDSGN\T&D Operations\Reports\Lancaster" ' Network
drive save path prefix.
regionprefix$ = "LA" ' Two character region filename prefix.
' Note: Year and Month sub-folders are automatically created.
'*******************************************************************
'
fileopenpointer$ = locfolderprefix$ ' "File+Open" command to point to this
folder.
'
'******
cksaveneeded:
' If WordBasic.IsDocumentDirty() = 0 Then GoTo bye
a$ = WordBasic.[FileName$]()
If LCase(WordBasic.[Left$](WordBasic.[Right$](a$, 16), 2)) <>
LCase(regionprefix$) Then
button = WordBasic.MsgBox("Not a valid SODR file name." + Chr(13) +
"Must be in the form of '" + regionprefix$ + "2003_02_30.DOC '", " SODR bad
filename ", 0)
GoTo bye
End If
'
cdrivesave:
'WordBasic.FileSave
namefile$ = WordBasic.[Right$](a$, 29)
WordBasic.FileSaveAs Name:=locfolderprefix$ + "\" + namefile$
'
createnetfoldersavename:
b$ = WordBasic.[Left$](WordBasic.[Right$](a$, 14), 4)
netfolderyear$ = b$
netfoldermonth$ = b$ + "_" + WordBasic.[Left$](WordBasic.[Right$](a$, 9), 2)
netfolder$ = netfolderprefix$ + "\" + netfolderyear$ + "\" + netfoldermonth$
'
WordBasic.PrintStatusBar "Saving to Network Drive. PLEASE WAIT. I'll let
you know what happened soon."
WordBasic.WaitCursor 1
On Error GoTo ErrorHandler
'
checknetfolderyear:
WordBasic.ChDir netfolderprefix$
On Error Resume Next
WordBasic.MkDir netfolderyear$
'
checknetfoldermonth:
WordBasic.ChDir netfolderyear$
On Error Resume Next
WordBasic.MkDir netfoldermonth$
'
netdrivesave:
WordBasic.CopyFile FileName:=a$, Directory:=netfolder$
' When using SODRSave macro to save the file opened from the G: drive,
' the file will not save to the G: drive the first time
' and a message will indicate cannot copy to itself.
' The file will save to the G: drive on subsequent tries.
' Because after the file is saved to the C: drive on the first try,
' the open file becomes the one saved to C: drive.
GoTo done
'
ErrorHandler:
button = WordBasic.MsgBox("File successfully saved to: " + Chr(13) + a$ +
Chr(13) + Chr(13) + "Unable to save to Network drive: " + Chr(13) +
netfolder$, " SODR path unavailable ", 0)
button = WordBasic.MsgBox("Network may be unavailable at this time." +
Chr(13) + "Use 'Save' command from File menu until the network connection is
restored.", " SODR path unavailable ", 0)
Err = 0
GoTo fileopenpointer
'
done:
WordBasic.PrintStatusBar "Save completed."
'
fileopenpointer:
' This section is to make the File menu + Open command in Word
' point to the folder specified in fileopenpointer$, normally on the C: drive.
' Otherwise it would point to the last save path, which is a network drive.
' This is to help avoid opening a file manually from a wrong location by
mistake.
On Error Resume Next
WordBasic.ChDir fileopenpointer$ ' "File+Open" will now point to this folder.
GoTo bye
'
bye:
End Sub Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75491
Macro Error Message
I recently inherited a Word document that is giving me the following error
when I first run a customized save macro:
"Word cannot copy a file to itself. G:\.....xxxxxxxxxx"
Now, if I Ok out of that error and rerun the macro, it runs without incident.
What is the probable cause of this error? I'm not too familiar with macro
coding, so I don't know what to really look for.
Any ideas on how to alleviate this error would be greatly appreciated.
Thank you.
BTW, I'm using Word 2003 on W2K.
The error is below:
Sub SODRSave()
'******** _LASODR.DOT "SODRSave" MSWord Macro ********************
'** last rev. 05/23/2003 **
'*****************************************************************
Dim locfolderprefix$
Dim netfolderprefix$
Dim regionprefix$
Dim fileopenpointer$
Dim a$
Dim namefile$
Dim b$
Dim netfolderyear$
Dim netfoldermonth$
Dim netfolder$
Dim button
'****** THESE VARIABLES MUST BE MANUALLY ASSIGNED BY THE USER ******
locfolderprefix$ = "C:\_T&D Operations\Reports\Lancaster" ' C: drive save
path prefix.
netfolderprefix$ = "G:\ENGRDSGN\T&D Operations\Reports\Lancaster" ' Network
drive save path prefix.
regionprefix$ = "LA" ' Two character region filename prefix.
' Note: Year and Month sub-folders are automatically created.
'*******************************************************************
'
fileopenpointer$ = locfolderprefix$ ' "File+Open" command to point to this
folder.
'
'******
cksaveneeded:
' If WordBasic.IsDocumentDirty() = 0 Then GoTo bye
a$ = WordBasic.[FileName$]()
If LCase(WordBasic.[Left$](WordBasic.[Right$](a$, 16), 2)) <>
LCase(regionprefix$) Then
button = WordBasic.MsgBox("Not a valid SODR file name." + Chr(13) +
"Must be in the form of '" + regionprefix$ + "2003_02_30.DOC '", " SODR bad
filename ", 0)
GoTo bye
End If
'
cdrivesave:
'WordBasic.FileSave
namefile$ = WordBasic.[Right$](a$, 29)
WordBasic.FileSaveAs Name:=locfolderprefix$ + "\" + namefile$
'
createnetfoldersavename:
b$ = WordBasic.[Left$](WordBasic.[Right$](a$, 14), 4)
netfolderyear$ = b$
netfoldermonth$ = b$ + "_" + WordBasic.[Left$](WordBasic.[Right$](a$, 9), 2)
netfolder$ = netfolderprefix$ + "\" + netfolderyear$ + "\" + netfoldermonth$
'
WordBasic.PrintStatusBar "Saving to Network Drive. PLEASE WAIT. I'll let
you know what happened soon."
WordBasic.WaitCursor 1
On Error GoTo ErrorHandler
'
checknetfolderyear:
WordBasic.ChDir netfolderprefix$
On Error Resume Next
WordBasic.MkDir netfolderyear$
'
checknetfoldermonth:
WordBasic.ChDir netfolderyear$
On Error Resume Next
WordBasic.MkDir netfoldermonth$
'
netdrivesave:
WordBasic.CopyFile FileName:=a$, Directory:=netfolder$
' When using SODRSave macro to save the file opened from the G: drive,
' the file will not save to the G: drive the first time
' and a message will indicate cannot copy to itself.
' The file will save to the G: drive on subsequent tries.
' Because after the file is saved to the C: drive on the first try,
' the open file becomes the one saved to C: drive.
GoTo done
'
ErrorHandler:
button = WordBasic.MsgBox("File successfully saved to: " + Chr(13) + a$ +
Chr(13) + Chr(13) + "Unable to save to Network drive: " + Chr(13) +
netfolder$, " SODR path unavailable ", 0)
button = WordBasic.MsgBox("Network may be unavailable at this time." +
Chr(13) + "Use 'Save' command from File menu until the network connection is
restored.", " SODR path unavailable ", 0)
Err = 0
GoTo fileopenpointer
'
done:
WordBasic.PrintStatusBar "Save completed."
'
fileopenpointer:
' This section is to make the File menu + Open command in Word
' point to the folder specified in fileopenpointer$, normally on the C: drive.
' Otherwise it would point to the last save path, which is a network drive.
' This is to help avoid opening a file manually from a wrong location by
mistake.
On Error Resume Next
WordBasic.ChDir fileopenpointer$ ' "File+Open" will now point to this folder.
GoTo bye
'
bye:
End Sub Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75490
Insert Landscape Page
I need to create a macro that inserts a page break after the current page
(which could or could not be the last page) and creates a landscape page.
The problem is I don't know how to test for where the user will be in the
document.
Is there a code that goes to the bottom of the current page?
Is there a code that once you go to the bottom that it can test to see if
you are at the end of the document?
I've wasted a day trying to figure this out and was hoping someone could
help me.
Thanks in advance.
--
Debra Ann Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75489
Tab stop weirdness
In my macro I want to clear all tabs, then set two tabs which should be
active for any text that the macro pumps out in the rest of the
document. I use this code from a 'Record Macro':
'set tab stops only at 1.25" and 3.0"
Selection.ParagraphFormat.TabStops.ClearAll
ActiveDocument.DefaultTabStop = InchesToPoints(0.5)
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(1.25), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(3), _
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
But for some reason after this code is executed these two tabs only hold
for the first paragraph of text that is pumped out afterwards. After
that, the tab setting reverts to one tab every 0.5". What am I doing
wrong? Thanks. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75486
modal status window?
i'm familiar with StatusBar, but i was wondering if there is any way to make
some kind of modal display similar to a MsgBox but without any buttons, and
have the text updated at various points by the macro and then eventually
closed?
thanks in advance! Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75481
forms
I have two word docs. I place a number into a form text field on the first
doc. How can I get that number into the second doc form field? Address the
second doc's form text field? Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75479
Auto Correct-Option of capitalizing after numbers, i.e., L4-5.
I would like to see the "option" of being able to automatically capitalize
the first word in each sentence after ending the previous sentence with a
numeral. I work for orthopaedic surgeons and a lot of my sentences end in,
for example, L4-L5. After becoming accustomed to this with Word 97, it's
hard to remember to capitalize those. Also, I used to be able to type 79yog,
and using Auto Correct, it translated to 79-year-old gentleman. I now have
to put a space after 79 and just have yog transfer to year-old gentleman,
which leaves a space after 79 - so it translates to
79 -year-old gentleman.
Please make these options available in Word again.
Thanks, Terry Lagnston
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/community/en-us/default.mspx?mid=18591416-2ec5-4364-872f-62e2926cbb53&dg=microsoft.public.word.vba.general Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75474
Changing & Saving Settings
Hi,
I would like to set up one instance of MS-Word 2K3 just the way I want with
the options set just the way I like them & then i'd like to export those
settings via .pip or via exported registry entries so I can bring them onto
other pc's so I don't have to manually setup the settings on all other pc's
in the office. is this possble? if yes, can you tell me how to do that?
I'm specifically looking to save & export settings from the
'Tools->->Options' and 'Format->->AutoFormat" menus.
Any help would be greatly appreciated.
Thanks
Chris Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75472
Finding string of many spaces
I need to find strings of multiple space characters and reduce them to 0, 1,
or 2 spaces, depending on the first character. What I think I need to do is
find two consecutive spaces, then extend the range forward and backward
until I hit a non-space character. What do I use to do that?
Ed Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75469
Passing variables between user forms and modules
I can't seem to find the best way to pass variables between a user form and a
module. Typically, I'm trying to send variables to a module to control how it
initializes fields during the load event, and sending variables back to the
module to determine subsequent processing based on the user's choices in the
form.
I know that if the form is still available (even if hidden) the module can
access the form objects with proper qualification. But it doesn't seem to
work the other way. That is, there doesn't seem to be any way to access
module variables from a form, unless I declare the variables as Public. But
that seems sloppy, somehow.
What's the best way to communicate variables between a module and a form?
Bear Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75467
Autofill one field from two others
Word 2000, protected form using Forms toolbox. Want to autofill text form
field '1' with entries placed in text form field '2' and '3.' Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75466
Calling Cindy Meister
Hello Ms. Cindy Meister. When I ran your following macro (via a MACROBUTTON)
in a protected form and I typed a search phrase, I got a Microsoft Visual
Basic error message that said "Run-time error '5941'; The requested member of
the collection does not exist." When I clicked Debug, the line "Set ffld
= doc.FormFields(Selection.Bookmarks(1).Name)" within the macro was hi-lited
in yellow.
Ms. Meister, what was I doing wrong?
_______________________
Sub FindInForm()
Dim doc As Word.Document, ffld As Word.FormField
Dim szFindTerm As String, lPos As Long
Dim szSearchString As String, rng As Word.Range
Dim rngStart As Word.Range, lNumFfld As Long
Dim lFfldCounter As Long
Set doc = ActiveDocument
szFindTerm = InputBox("Enter the phrase you wish to find:")
lNumFfld = doc.FormFields.Count
lFfldCounter = 0
Set ffld = doc.FormFields(Selection.Bookmarks(1).Name)
If Len(szFindTerm) = 0 Then Exit Sub
Set rngStart = Selection.Range
Set rng = rngStart.Duplicate
rng.End = ffld.Range.End
szSearchString = rng.Text
Debug.Print szSearchString
lPos = InStr(ffld.Result, szFindTerm)
If lPos > 0 Then
Selection.MoveStart wdCharacter, lPos - 1
Selection.MoveEnd wdCharacter, Len(szFindTerm)
Exit Sub
End If
Do
Set ffld = ffld.Next
If ffld Is Nothing Then
Set ffld = ActiveDocument.FormFields(1)
End If
If rngStart.InRange(ffld.Range) Then
MsgBox "All form fields were searched; the phrase was not found."
Exit Sub
End If
ffld.Select
Selection.Collapse
Set rng = Selection.Range
rng.End = ffld.Range.End
szSearchString = rng.Text
Debug.Print szSearchString
lPos = InStr(ffld.Result, szFindTerm)
If lPos > 0 Then
Selection.MoveStart wdCharacter, lPos - 1
Selection.MoveEnd wdCharacter, Len(szFindTerm)
Exit Sub
End If
lFfldCounter = lFfldCounter + 1
Loop Until lFfldCounter = lNumFfld
End Sub Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75462
Printing embedded documents in MS Word 2003
I wish to print a document INCLUDING its embedded document objects
(shown as clickable icons) in MS Word 2003 in one single operation. As
it is now, I have to manually open and print each of the attachments,
which can be very tedious if the document has lots of embedded files.
I found a message on microsoft.public.word.vba.general
(http://groups.google.com/group/microsoft.public.word.vba.general/browse_thread/thread/cb35eaf1f5a28cd4/)
that included a VBA script (attached below) that solves this problem
partially - only MS Word objects are handled properly. Does anyone
have a solution that will work with MS Excel and plain-text objects as
well?
Sub PRINT_Attachments()
'
' PRINT_Attachments Macro -- to print attachments in a doc
' Comments: TYPE=1 is an embedded object
x = 0
x = ActiveDocument.InlineShapes.Count
Do While x <> 0
If ActiveDocument.InlineShapes(x).Type = 1 Then
If ActiveDocument.InlineShapes(x).OLEFormat.ProgID <> "Package" Then
ActiveDocument.InlineShapes(x).Activate
ActiveWindow.PrintOut
ActiveWindow.Close
End If
End If
x = x - 1
Loop
End Sub
--
Karl Erik Birkeland, MDNV
http://home.no/blazius/ Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75461
MS Word 2000 Protecting Format
Looking for a way to protect the format of a word 2000 document by using a
macro or vb code. document has extensive bookmarks that are automatically
filled in from a external application, trying to disable the ability of users
to change the document
but still allowing the bookmarks and macros to run automaticaly as well as
allowing them to enter text in the text form fields ? can this be done ? Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75459
VBA Word Macro freezes when exiting sub routine
I am searching though some text to break it up into name/value pairs,
the names are in bold, and the values follow, see below.
BoldName1 Value1
BoldName2 Value2
etc....
When executing the code it freezes Word when as it ends the subroutine.
I have stepped through the code and all works correctly (correctly
finding all name/value pairs) right up until End Sub which locks up
Word. Here is the code:
Dim descriptionRange As Word.Range
Dim searchRange As Word.Range
Dim tempRange As Word.Range
Dim names(100) As String
Dim values(100) As String
Dim Go As Boolean
' Select the area where the Name/Value pairs are
Selection.Find.ClearFormatting
Selection.Extend
With Selection.Find
.Text = "Execution Status :"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
If Selection.Find.Found <> True Then
' Can not find
MsgBox ("could not find description block")
End If
' Store this area in a Range
Set descriptionRange = Selection.Range.Duplicate
Set searchRange = Selection.Range.Duplicate
Set tempRange = Selection.Range.Duplicate
Selection.Start = descriptionRange.Start
Selection.End = descriptionRange.End
' Find the Name/Value pairs
pairIndex = 0
Go = True
While Go
' Break up range into Name/Value pairs and insert into a table
searchRange.Find.ClearFormatting
searchRange.Find.Font.Bold = True
With searchRange.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
searchRange.Find.Execute
If searchRange.Find.Found <> True Then
Go = False
GoTo exitSearch
End If
' Get the name (In Bold)
names(pairIndex) = searchRange.Text
' Move searchRange to end of Name
searchRange.Start = searchRange.End
searchRange.End = descriptionRange.End
valueStart = searchRange.Start
' Select the rest of the Value
searchRange.Find.ClearFormatting
searchRange.Find.Font.Bold = True
With searchRange.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
searchRange.Find.Execute
If searchRange.Find.Found <> True Then
' Last item so need to take remaining text and make it the
Value
Go = False
tempRange.Start = valueStart
tempRange.End = descriptionRange.End
values(pairIndex) = tempRange.Text
GoTo exitSearch
End If
tempRange.Start = valueStart
tempRange.End = searchRange.Start
values(pairIndex) = tempRange.Text
searchRange.Start = searchRange.Start
searchRange.End = descriptionRange.End
pairIndex = pairIndex + 1
exitSearch:
Wend
End Sub Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75458
Macro Recording - Entering Text in a Text Box
I am trying to write a macro that copies text from Document A, opens Document
B, and pastes the text into a textbox in Document B. Unfortunately, while
recording the macro I can manually open Document B, but can't seem to get the
focus on the textbox. The macro ends up just pasting the copied text on the
first line of Document B.
Any suggestions? Thanks
Stephen Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75455
What event occurs on form load?
I am trying to make some things happen when my user form loads in Word 2002.
I have tried FormName_Load and FormName_Initialize, but neither seem to
produce the effect desired. For example, consider a userform that you bring
up, and at initialization you want it to make some checks and based on these
render certain controls non visible. This is what I am trying to do. Thanks
for your help. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75451
find/replace on tables only
is there a way to perform a find/replace but only on selected text or table?
thanks! Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75448
Automatically check another checkbox if this one is checked
I am trying to do a macro that will automatically check boxes 17 and 20 if
5,6, or 7 are checked. Any simple solutions? I have Word 2000. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75441
VB API translating into VBA
Hi,
I'm trying to use a Named Pipe in Word2003. I will let Word talks via this
pipe with another application that serves as an pipe server. I have this
working in two other programming laguages Xbasic and PureBasic. Now I want
add VBA to it
The API function (Visual Basic version) doesn't work in VBA and let Word
crash is the following:
Public Declare Function CallNamedPipe Lib "kernel32" Alias "CallNamedPipeA"
_
(ByVal lpNamedPipeName As String, _
ByRef lpInBuffer As Any, _
ByVal nInBufferSize As Long, _
ByRef lpOutBuffer As Any, _
ByVal nOutBufferSize As Long, _
ByRef lpBytesRead As Long, _
ByVal nTimeOut As Long) As Long
When I change all the Longs in Integers and call it as an CallNamedPipeA
version it doesn't crash anymore and the communication does something.
Declare Function CallNamedPipeA Lib "kernel32.dll" ( _
ByVal lpNamedPipeName As String, _
lpInBuffer As Any, _
ByVal nInBufferSize As Integer, _
lpOutBuffer As Any, _
ByVal nOutBufferSize As Integer, _
lpBytesRead As Integer, _
ByVal nTimeOut As Integer) As Integer
Both versions do get a connection to the pipe server which is running at
that moment. The ReadFile() action in the server doesn't return with
success, res = 0. The server does work correct in connection to other
programs.
-------------- start of VBA code -----------
Option Explicit
Private Const pipeName As String = "\\.\pipe\mynamedpipe"
Private Const BUFFSIZE = 1024
Private hpipe As Integer
Private myerror As Integer
Public Const INVALID_HANDLE_VALUE As Integer = -1
Declare Function CallNamedPipeA Lib "kernel32.dll" ( _
ByVal lpNamedPipeName As String, _
lpInBuffer As Any, _
ByVal nInBufferSize As Integer, _
lpOutBuffer As Any, _
ByVal nOutBufferSize As Integer, _
lpBytesRead As Integer, _
ByVal nTimeOut As Integer) As Integer
Public Sub CallAPipe()
Dim res As Integer, cbRead As Integer, numBytes As Integer
Dim lpInBuffer As String
Dim lpOutBuffer As String
lpInBuffer = "Some text from Word."
numBytes = Len(lpInBuffer)
lpOutBuffer = String(BUFFSIZE, 0)
res = CallNamedPipeA(pipeName, lpInBuffer, numBytes, lpOutBuffer, BUFFSIZE,
cbRead, 0)
If res = 0 Then
myerror = Err.LastDllError
MsgBox "Error number " & myerror & Error(myerror), vbOKOnly
Else
MsgBox "Ok"
End If
End Sub
-------------- end of vba code -----
Is there someone who has done this before and can point me in the right
direction with this code? All kind of help with this code is appreciated.
Regards,
Marcel Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75440
Delete to end-of-file?
Is there a VBA command for "delete to the end of this document"?
Thanks. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75439
how do I make 8 frames into a single document?
I have created an 8 frame web quest, you know, 8 web pages. How do I insert
a button or icon directing users to start at a page on then go to frame or
page two? What navigational tools are available to users of the word program?
--
Yolanda Johnson-Hines Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75438
Word bug editing field text in text-wrapped table
The code below should create a new document field and remove its code
text. However, in Word 2000 and XP, if the range of the new field
happens to occur inside a table which has its "Text Wrapping" property
set to "Around", the text "T " is always left behind in the field. In
fact, any assignment to the field code's "Text" property appends "T "
to the end of the text assigned.
Has anyone seen this apparent bug before? Does anyone have a solid
workaround? The only workaround I've found is to call "Delete" on the
field's code before assigning a value to its "Text" property.
Thanks. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75430
Close Document Failure in Word 2002
Does anyone know why this would fail
Application.DisplayAlerts = wdAlertsNone
ActiveDocument.Close
Application.DisplayAlerts = wdAlertsAll
Most of my experience is in Excel VBA, but it seems like this should
work. What I get is a Save As... dialog and an error that says
"Run-time error '4198': Command failed" when I click the Cancel button.
I'm trying to avoid the dialog box with the dispalyalerts = none, but
it keeps popping up anyway.
When I choose Debug from the error dialog it appears to be hung up on
the .close line.
Is there an alternate way to close a document without being prompted to
save?
Thanks Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75424
Reset PrintToFile to FALSE without printing?
I have a macro that prints the current page to a dummy file. But I find that
the Print To File box stays selected the next time I want to print anything.
How do I programmatically reset the PrintToFile value to FALSE without
having to print anything?
--
Thanks!
JoAnn Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75423
Points returned by Information(wdHorizontalPosition...)
In a macro, the value returned by
"Selection.Information(wdHorizontalPosition..." and
"Selection.Information(wdVerticalPosition...)" is in points, even though the
help says the value is in twips. I assume that the function is accurate.
Should the returned value be rounded or truncated or used exactly as
returned? For example, if a paragraph is indented 0.5 inches, the returned
value is 36.0 points which computes to an actual indent of 0.5 inches.
However, if the paragraph is indented 0.25 inches, the returned value is
18.45 points which computes to exactly 0.25625 inches.
Can Word actually do its metrics in fractions of points and, for that
matter, in fractions of twips? When returned values are converted to twips,
occassionally the answer is in fractions of twips. I have double- and
triple-checked the calculations and for multiples of 1/2 inch (0.0, 0.5, 1.0,
etc.), the results are always perfect.
Thanks for your help. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75421
how to sign programmatically some vbproject macros added by a .do
Dear all,
I would like to sign programmatically some macros added to a
vbproject(document) created by mean of a template say " mytemplate.dot"
Have any of you an idea if this is possible and if so how to proceed ?
(Code snippet is a must)
Looking forward to hear from you I remain
Thank you much in advance
Best regards Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75420
add programmatically a module class from a file in a VB project
Hi all
I would like that my template.dot which creates a new document
within a vbproj(document1) can add a module class within the new document
programmatically from file "c:\theclass.cls"
I cannot figure out the appropriate code , can someone help me ?
'Sub AddModuleClassinMyproject( classname,path)
Dim v As Integer
v=
activedocument.VBProject.VBE.ActiveVBProject.VBE.CodePanes.item.VBE.CodePanes.count
activedocument.VBProject.VBE.ActiveVBProject.VBE.CodePanes.item(v).
.CodeModule.AddFromFile path+className'
activedocument.VBProject.VBComponents("EventClassmodule").CodeModule.AddFromFile path+className
'
'End Sub Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75419
Word Macro to Add Attachments to Email
I have a macro in Word 97 that saves a doc to Outlook Express email.
Is there a way to add the same five attachments to an email by setting that
text in the document?
TIA for any guidance.
PS: While I'm here, I have to manually change the email format from 'Plain
Text' to 'Rich Text'. Wondering if there's something I can add to the doc to
do this for me. Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75415
Stop recording macro while dialogue box is open
I asked this question a week or sso ago but did not make it clear exacctly
what I needed to do. Someone called Doug offered some suggestions but I
cannot find the original post - so here is my question:
I want to automate a repetitive sequence by creating a macro to run the
following actions, (once Record New Macro has been started):
Click on Insert
Click on Field
In Categories, click on Mailmerge
In Fieldnames, click on MergeField
Place the cursor into the field where you can type in the name or
description of the mailmerge field.
Now, STOP recording. (Because the details of the mergefield will be
different every time that this is used, on the many hundreeds of mergefields
that we need to create)
Trouble is, with this dialogue box open, you cannot click on the macro
toolbar to stop the recording. Is there a keystroke/combination that does
this? Or any tother solution?
Doug xxxx did try to help me before but I didn't describe the requirement
quite correctly and also I cannot find that previous post...
Many thanks
CW Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75407
how to link two fiie and subjects
how do you link two seperate files and show subject reference in one file and
connect it with a similiar subjet in another file, and maintain that refernce
even if subject matter is moved to another section but in the same file.
Winsor Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75403
can I generate bookmarks in Word using VBA?
I have existing documents that I want to process using VBA to insert
bookmarks. How do I mark my insertions so that they function as books? Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75400
Copy from Excel to Word
I have a program (see bellow) that I canâ??t make it work.
Basically, the program copy excel cells, open specific word file, however,
it not paste it the cells into the word document.
Could you please help me with this matter?
Thanks in advance.
Maperalia.
Option Explicit
Public Sub CopyExcelToWord()
CopyCellsFromExcel
OpenAWordFile
PasteIntoWord
End Sub
Sub CopyCellsFromExcel()
'***********COPY CELLS IN EXCEL****************************
Range("A1:I66").Select
Selection.Copy
Application.CutCopyMode = False
Range("A1:I1").Select
'**********************************************************
End Sub
Sub OpenAWordFile()
Dim wordApp As Object
Dim fNameAndPath As String
'***********OPEN THE MICROSOFT WORD FILE****************************
fNameAndPath = "C:\Test\Sample.doc"
Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Open (fNameAndPath)
wordApp.Visible = True
'**********************************************************
End Sub
Sub PasteIntoWord()
Dim wdPasteOLEObject As String
Dim wdInLine As String
'***********PASTE THE EXCEL CELLS INTO WORD
FILE****************************
Selection.PasteSpecial Link:=True, DataType:=wdPasteOLEObject,
Placement:=wdInLine, DisplayAsIcon:=False
'**********************************************************
End Sub Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75387
Fill imagebox in userform with a specified picture from a document
Hello,
I have the following problem. I have inserted a total of 6 pictures into
specified cells of a table in word. To achieve this, I use the code below and
this is running OK :
'row = 6
'column = 2
Set rgDest = Selection.Tables(1).Cell(row, column).Range
Set shpShape = ActiveDocument.Shapes.AddPicture _
(FileName:=StrFile, LinkToFile:=True, _
SaveWithDocument:=False, Anchor:=rgDest)
With shpShape
.Name = "photo1"
.LockAnchor = True
.LockAspectRatio = msoTrue
.Height = CentimetersToPoints(6.65)
.Left = CentimetersToPoints(-0.2)
End With
The problem now is : I want to select each of these pictures and place it in
one of the 6 imageboxes of a userform. This is possible by the code :
set userform1.photo1.picture = loadpicture(strfile), but for some reasons I
want to fill the imageboxes based on the name (for instance "photo1" in my
example) or another identifier of the shape in my document. I only need to be
sure to pick the photo in my document and place it in the correct imagebox of
my userform.
Can anybody help me with this?
Thanks,
Vicenflor Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75384
listnum field and start at value - why?
how do these work? why use start at value? Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75378
Compressing graphics
Hi,
Word has a command that is shown when a graphic is selected. Select
Layout and the last command: Compress?? graphic. A dialog is displayed
in which I can select 'Compress all graphics' and 'Screen or printer
resolution'.
How can I perform this file size reduction macrowise? A recorded macro
looks like this:
Selection.InlineShapes(1).Fill.Visible = msoFalse
Selection.InlineShapes(1).Fill.Solid
Selection.InlineShapes(1).Fill.Transparency = 0#
Selection.InlineShapes(1).Line.Weight = 0.75
Selection.InlineShapes(1).Line.Transparency = 0#
Selection.InlineShapes(1).Line.Visible = msoFalse
Selection.InlineShapes(1).LockAspectRatio = msoTrue
Selection.InlineShapes(1).Height = 682#
Selection.InlineShapes(1).Width = 453.85
Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
Selection.InlineShapes(1).PictureFormat.ColorType =
msoPictureAutomatic
Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
Selection.InlineShapes(1).PictureFormat.CropRight = 0#
Selection.InlineShapes(1).PictureFormat.CropTop = 0#
Selection.InlineShapes(1).PictureFormat.CropBottom = 0#
And I guess this is not what I need.
Thanks! Tag: How can you install Equation Editor on Microsoft Office Pro 2003 Tag: 75376
I'm trying to get directions to install Equation Editor in Microsoft Office
Pro 2003. If you can help please let me know. Thanks
"Rob" wrote in message
news:5506D55C-E713-427E-97AA-26FF6F57CB18@microsoft.com...
> I'm trying to get directions to install Equation Editor in Microsoft
> Office
> Pro 2003. If you can help please let me know. Thanks