-
WSfrankpasztor
AskWoody LoungerFunnily enough Kev my boss just asked me to do the same thing.
I need to allow our sponsors to insert a selected inline graphic (warnings, etc) into a document.My basic soln is to use Selection.InlineShapes.AddPicture … as the double-click event behind each picture.
the graphic is then placed at the insertion point much like the smilies in this lounge. -
WSfrankpasztor
AskWoody LoungerAs an addendum…
this blow-out appears to be restricted to some W97 templates whose Word.Basic was upgraded to VBA in WordXP. The ‘fix’ was to start with a clean
template based on WordXPs Normal.dot and then import all code etc into this clean template.I can’t find anything wrong with the defective(?) templates so I assume that they where corrupted in some way.
Just another of those wonderful things Word does …..
-
WSfrankpasztor
AskWoody LoungerIts not very ‘learned’ but I just switch to printview and back again.
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreviewI find that this takes a lot less code and allows me to use doc properties to update my header/footers.
-
WSfrankpasztor
AskWoody LoungerUnfortunately docs sare saved as .DOC so I cannot explain whats happening.
But as these templates have evolved from W95 through W97 and now to XP,and the codes completely re-written ( no WordBasic)
maybe..maybe.. maybe there’s something hiding.. -
WSfrankpasztor
AskWoody LoungerNothing I do can stop this from happening.
I’ll be manually rebuilding one of the offending templates from Normal.dot upwards to see if this fixes the problem.
Do you know of any way to stop Word from converting/uncompressing a graphic file?
-
WSfrankpasztor
AskWoody LoungerAugust 20, 2002 at 9:28 pm in reply to: Determining which ListTemplates item is in use (VBA Word 2000) #610120Greetings Klaus
I have virtually the same problem with numbered Headings styles ‘drifting’. Unfortunately the renumbering(in my case)
was an adaption of the code generated by Words Macro recorder and does use ListGalleries.Could you point me in a direction that doesn’t use ListGalleries?
Frank
-
WSfrankpasztor
AskWoody LoungerAugust 20, 2002 at 9:18 pm in reply to: Referencing a function in another template (VBA (Word97/2000)) #610115I maintain an application containing a large number of automated Word templates.
Each template contains only enough code to auto-run, and specific boilerplate text/one-off macros
All generalised functions are held in the one global template called TRIDENT.DOT
The following line of code launchs a common user details form ( located in Trident).
The parameter decides what options will be displayed. This is called by all ‘child’ templatesTrident.Forms.Global_EntryLaunch (“DEFAULT”)
The global template MUST BE referenced( use Tools>references) within the
-
WSfrankpasztor
AskWoody LoungerYes, granted.
But that doesn’t explain the Normal.doc being 76K and my custom template based doc being 593K with EXACTLY the
same graphic(& NOTHING else) inserted using the same method.Frank
-
WSfrankpasztor
AskWoody LoungerI use this dialog box to allow the user to insert a garphic.
If Dialogs(wdDialogInsertPicture).Show = 0 Then
‘ Graphic cancelled
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Cut
Exit Function
End IfSubstituting the following InlineShape makes NO difference to size…
Selection.InlineShapes.AddPicture FileName:= _
“C:Documents and SettingsFrankMy DocumentsMy PicturesCAKE.JPG”, _
LinkToFile:=False, SaveWithDocument:=TrueNow both work but what I can’t understand is why using either of the above(or manually inserting) to insert a graphic
Causes a document based on the Normal.dot to be almost TEN TIMES SMALLER than one of my customized templates
Could this blow out be caused by something in my templates or is this a Word problem?Frank
-
WSfrankpasztor
AskWoody LoungerUnfortunately I don’t know how to write class modules yet but between your answer and Chris Greaves I’ve got a viable solution.
Looking at your example I can’t figure out why mine wouldn’t work. Maybe after I’ve got a working string parsing solution going I’ll be able to re-visit a ‘neater’ array solution.
many thanks
Frank -
WSfrankpasztor
AskWoody LoungerPassing style name arrays was what I needed. Your answer now puts me on the right track and the code will follow.
Incidently you’ve also solved a couple of other questions that I hadn’t got around to looking at.One of the annoying things about programming is the inability to see a bug/solution thats stareing you right in the face.
BTW you made a spelling mistake near the end, the correct line reads;
ActiveDocument.Styles(“Style1”).LanguageID = wdEnglishAUS
Many thanks
Frank -
WSfrankpasztor
AskWoody LoungerThanks for your comments everyone but to clarify my situation…
I have heaps of templates being used throughout Australia to deliver technical documents.
My front end uses a global template to control execuation , and VBA code in the ‘child’ templates.
Now the documents produced do have their own styles but are continually being updated and modified.
With several different style sets, using the ‘latest’ version results in the newly attached macros failing becouse the document
and the new template don’t share a common style set.My solution is to create a 2 dimensional array that controls substitution of style sets, updates the document and then deletes the old style set. This must be in the new template.
I would like the actual VBA procedures to be global and located only in the global template. But becouse I
can’t pass an array from a documents attached template to the master global one I have to duplicate the same code in each of many many many templates.There are literally thousands of docs out there, a global module is a lot easier to keep track of than an
entire suite of induvudualized templates.Thanks again for your responses.
-
WSfrankpasztor
AskWoody LoungerI don’t know why the corruption happens but you may be able to simplify things if you have separate styles
for each font used. In our templates we use only two actual fonts but a ridiculous number of styles.When I need to change fonts/styles I attach the document to its new template, and substitute the newer style for the current ones. Providing you can make up an array containing BOTH the old and new styles
The entire process can become relatively painless.Its less traumatic to add/update/delete a style than conduct open heart surgery with fonts.
-
WSfrankpasztor
AskWoody LoungerFebruary 27, 2002 at 12:41 am in reply to: Word XP Upgrade woes (Office XP, Win 2k Server, Windows XP Pro) #572901Don’t know if good evening is warranted geof,
As my firm will be going the XP upgrade path in the third quarter of 2002, and we have a huge number of W95/W97 documents in our system, I’m particularly interested in any ‘legacy’ problems that I might be in store for.
Where you said that you opened the binary file, are you talking about modifying each and every word template and document?
-
WSfrankpasztor
AskWoody Loungergreetings and Salutations,
(1) I am producing templates that must function in both W97 and XP and they do. To cover as many contingencies as possible set your XP options for W97 compatibility. There may be backwards compatibility problems in complex docs but I’ve only hit one really troublesome one… see (3)
(2) Yes, You will find that most W97 VBA code is common. Most WordBasic even works.
There isn’t any conversion required. Your only prob may be that some otherwise identical XP VBA has had new constants added. ie a parameter that specifies a XP default and needs to be rem’ed out in order to work in W97.
(3) ONE POSSIBLE PROBLEM … I suggest that when creating templates that need to function in both versions and you need different header/footers on the odd and even pages that you ensure that you create a ‘different first page’, never just odd/even pages.
Frank Pasztor
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
4 Strange Facts About Тостер За Сандвичи (Awaiting moderation)
by
rosalinepettey6
3 hours, 4 minutes ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
11 hours, 27 minutes ago -
Are Macs immune?
by
Susan Bradley
8 hours, 50 minutes ago -
HP Envy and the Function keys
by
CWBillow
14 hours, 32 minutes ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
22 hours, 44 minutes ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
23 hours, 1 minute ago -
Unable to update to version 22h2
by
04om
9 hours, 43 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
1 day, 6 hours ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
1 day, 6 hours ago -
Very Quarrelsome Taskbar!
by
CWBillow
16 hours, 21 minutes ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
1 day, 19 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
1 day, 8 hours ago -
Is your battery draining?
by
Susan Bradley
6 hours, 10 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
6 hours, 33 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
1 day, 23 hours ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
1 day, 7 hours ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
1 day, 7 hours ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
1 day ago -
National scam day
by
Susan Bradley
6 hours, 43 minutes ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
1 day, 3 hours ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
3 days ago -
Tools to support internet discussions
by
Kathy Stevens
1 day, 13 hours ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
2 days, 15 hours ago -
AI is good sometimes
by
Susan Bradley
3 days, 7 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
2 days, 21 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
4 days, 7 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
4 days, 6 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
4 days, 10 hours ago -
Excessive security alerts
by
WSSebastian42
3 days, 1 hour ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
4 days, 19 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.