|
With all the (very bad) string concantenation your doing to build paths, you may want to look into the Path.Combine[^] method to do this for you.
|
|
|
|
|
cooper000007 wrote: [code]
Do use the <code> and </code> tags instead. It makes code look nicer when posted
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi All,
I am having an assignment in which i m working on local machine and a proxy is set on Remote machine. So i need to send mail from local machine. When i m trying to open gamil from local machine then it is showing site is prohibited. for this i need to go on server machine using remote desktop to send mail using gmail a/c.
So i want to send mail from local machine. plz help me and provide me source code in vb.net.
Thanks,
Rohit
|
|
|
|
|
I'm making a few assuptions about your environment here, but, as far as your description goes, you're out of luck. The proxy is specifically prohibiting you from getting to GMail, probably for very good reasons.
You either have to have the administrators open up the Proxy to GMail, or you're not going to be using GMail.
|
|
|
|
|
Thanks for reply.
This is correct that proxy is specifically prohibiting for getting Gmail.
This Question is related to our upcoming project in which we need to send mail using local machine. Currently we are going at remote server and testing our application. Mail is going correctly on remote computer but when we are running application at local machine then it is showing "Failure Sending Mail message".
So we know that there is proxy on Remote side and we need to test it on local machine
Please give me suggestion as source code
Regards
Rohit
|
|
|
|
|
rohitkpurohit wrote: This Question is related to our upcoming project in which we need to send mail using local machine.
OK. Your "local machine" will need to be running an SMTP server to send mail out. Oh! And that box is going to need access to the internet through your firewall too. On top of that, any upstream mail servers you end up going through are going to demand your SMTP server be authorize to use them.
rohitkpurohit wrote: "Failure Sending Mail message".
This is probably because your machine cannot connect to the target server. Again, your proxy/firewall is getting the way. No amount of code you write will get around this problem. You simply have to get acces from your network administrators.
|
|
|
|
|
thanks for reply,
i will try as u told me.
|
|
|
|
|
Hello,
I have the following question.
I publish my application to a folder, after that i copy the folder to for example a usb stick with that stick i go to the PC where the programm needs to be installed.
When i run the setup the programm is auto installing and is working without any problems.
What i dont find is how i can set the directory where the programm needs to be installed . for the moment is is installing someware Locallow\...\...
So the directory is not in program files.
Can anyone tell me how i can change that ?
I have a second question, i need to copy also a DLL for my star ticketprinter to the installation destination folder is there a way that i can include it in the setup ?
Thanks
Best regards
DCA
|
|
|
|
|
Is it published using ClickOnce?? If so, you have no control over the install location.
If you created an .MSI installer (non-Express versions of VS,) then you've got control over where it installs. Or, you can even use third party installer creation apps, like InnoSetup, Wise Package Studio, InstallShield, ...
|
|
|
|
|
Hello,
Thanks for responding.
When i check the properties of the project i see in security settings Enable Clickone Security settings. When i uncheck that one and do a publish i can still not select the destination directory.
Can you please give one more time advise please.
thanks
DCA
|
|
|
|
|
I already said if you're using ClickOnce to deploy your application, and you are from what I can tell, you have zero control over the installation directory. Once again - are you using an Express Edition of Visual Studio??
It's that simple. I already told you want your options are.
|
|
|
|
|
Hello,
Sorry, i was forgotten to set in my mail wich version i use :
Visual Studio 2008 professional Service Pack 1
Can you please write me very short the steps i have to check ?
Thanks
Best regards
DCA
|
|
|
|
|
Add a Setup project to you solution. There's a wizard available to walk you through the basics.
|
|
|
|
|
Dear All
I had used following code in VB6.0 to open test document through shell and I got following error....
Code: Shell "C:\shashi\test.doc"
Error: Invalid procedure call or argument
Code: Shell "C:\Program Files\Microsoft Office\OFFICE11\winword.exe" & "C:\shashi\test.doc"
Error: File Not Found
Please help......
|
|
|
|
|
I think you are missing a space before the file name, so what you have is
winword.exeC:\shashi\test.doc
so try
Shell "C:\Program Files\Microsoft Office\OFFICE11\winword.exe" & " C:\shashi\test.doc"
Bob
Ashfield Consultants Ltd
|
|
|
|
|
thanx for reply...
same error again actually there is no sapce present...
|
|
|
|
|
Shazz Rock wrote: Code: Shell "C:\shashi\test.doc"
You'll have to use ShellExecuteEx to do that.
|
|
|
|
|
thanx...
do i hav to add preference or component....
if not then sorrrry to say it didn't work...
please give another solution....
|
|
|
|
|
The ShellExecuteEx is an API. Google it next time before you 1-vote replies, or next time you won't get any replies.
|
|
|
|
|
Shazz Rock wrote: Shell "C:\shashi\test.doc"
Error: Invalid procedure call or argument
There's only a couple of reasons this would have failed. The first is if the file path doesn't exist. The second is if there is a problem with the extension association (.doc) with an application. But, in this case, you would not have gotten the error you did.
Shazz Rock wrote: Shell "C:\Program Files\Microsoft Office\OFFICE11\winword.exe" & "C:\shashi\test.doc"
Error: File Not Found
It didn't work because you tried to execute something called Program , with the command line parameters of Files\Microsoft and Office\OFFICE11\winword.exe and C:\shashi\test.doc . Spaces, anywhere in the command line, are treated as delimiters.
You need to wrap full path specifications in double quotes so they are treated as a single component of the command line.
Your code should be closer to:
Shell """C:\Program Files\Microsoft Office\OFFICE11\winword.exe"" & _
" " & """C:\shashi\test.doc"""
|
|
|
|
|
"hello
I have following problem, I want to pass a variable in VBA code (MS Access)
M_Variable = "Text"
with Mrst
![M_Variable]= "AnotherTextString"
end with
The problem is I don't know how to pass this variable on.
Do I have to put hyphens? ("'"M_Variable"'" or [ & "'" & M_Variable & & "'" & ]) I tried some more combinations but they didn't work.
Many thanks for your help
Pierre
|
|
|
|
|
Try this
dim x as string
x = Mrst![M_Variable]
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello Bob
Thank you for your reply.
It gave me a hint. following solution worked.
With MyRst
.AddNew
.Fields(MyString) = mychaine(M_Number)
.Update
End With
Thanks again
Pierre
|
|
|
|
|
No problem.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i thought it is not very difficult to create such a fn
|
|
|
|