|
-
Apr 5th, 2005, 09:46 AM
#1
Thread Starter
New Member
SaveAs code
Hello,
Im writing a macro and need to know how to Save the drawing I created with the macro, within the code. The macro runs, then the Save As window pops up. The only help I can find in the help file is dwg.SaveAs, or just SaveAs. However I do not know how to impliment it. If anyone has some code with this function, Id love to take a look at it just to compare what Im trying to do with what works. Thanks so much.
-
Apr 5th, 2005, 11:03 AM
#2
Re: SaveAs code
HighHelix, this is for your autocam program? Usually the .SaveAs requires an expression that relates to the
document, workbook, or presentation. In your case it should relate to a drawing. I dont know what the object
is in autocam, but it should go something link this...
VB Code:
Drawing.SaveAs "C:\MyFile.???", Arg2, Arg3, ...
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 5th, 2005, 11:20 AM
#3
Thread Starter
New Member
Re: SaveAs code
Do I have to specify what the file should be called? I need to run this macro over and over again and I dont want to declare a file name within the macro. I need the Save As window to come up so I can name the drawing. Im going to pick up a book, but it is difficult because of the unique application. CNCs are now commonplace for Millwork companies and I know lots of people who would write their own code, except no one has written a book on writing VBA code for CAM applications. Know any authors? Id be happy to provide technical info for co-author rites!
-
Apr 5th, 2005, 12:07 PM
#4
Re: SaveAs code
I dont know of any off-hand, but I'll keep it in mind.
You should be able to use the Object Browser to see all the available objects and their methods/props/events.
Usually you can press F2 to bring it up. In this browser you can search for the Save and SaveAs. It should
have a brief syntax description too.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|