Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

XP, word 2003, and .EMF files


Recommended Posts

We've had 3 machines upgraded, with windows XP and word 2003. Now a problem has cropped up, the VB script doc sheet I wrote is supposed to put a .EMF file of the part at the bottom of the sheet.

However, with this combination, the .EMF file in the text box is solid black. Any ideas what may be causing this?

 

John

Link to comment
Share on other sites

I take that back. Forgot to make a slight change in the code, went back and did it. I don't get an image at all now, just a blank box with a cursor. The bitmap file isn't being written (its a .bmp file, right?)

 

FWIW, heres the code that does the graphic and puts it into word:

code:

'Load Graphic into textbox

graphic="c:temptest.emf" <--replaced with .bmp

DoMetafile graphic <---replaced with DoBitmapFile

.Selection.ShapeRange.Select

.ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 115, _

480, 390, 302).Select

.Selection.ShapeRange.TextFrame.TextRange.Select

.Selection.Collapse

.Selection.ShapeRange.Line.Visible = msoFalse

.Selection.InlineShapes.AddPicture graphic,False,True

Link to comment
Share on other sites

HAH! shoulda done this first...did some searching on the forums, and made this modification...

 

code:

 

'Load Graphic into textbox

graphic="c:temptest.emf"

Call SetBackGroundColor(mcCOLOR_WHITE)

Call RepaintScreen(True)

DoMetafile graphic

.Selection.ShapeRange.Select

.ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 115, _

480, 390, 302).Select

.Selection.ShapeRange.TextFrame.TextRange.Select

.Selection.Collapse

.Selection.ShapeRange.Line.Visible = msoFalse

.Selection.InlineShapes.AddPicture graphic,False,True

Call SetBackGroundColor(mcCOLOR_BLACK)

Call RepaintScreen(True)


Works now! also tried the open GL off (already was) and turning down hardware acceleration. neither worked!

 

John

Link to comment
Share on other sites
  • 2 weeks later...

Hi John,

I came up to WI a while ago, and Jake gave us a copy of your script to use in NC. We were having the same problem w/ 2 of our shop computers and I couldn't figure it out. I'm going to try doing what your last post says and see if that helps. We could get a correct image if the screen backgound was set to white. I'll write back and let you know what happens.

 

Dennis Archer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...